Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fox's smart compiler
Message
De
11/10/2001 13:56:59
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de projet
Divers
Thread ID:
00567111
Message ID:
00567122
Vues:
14
>Okay, I think I've got my wires crossed. I've been reading a little about C++ lately and I think I've got my compilers mixed up.
>
>If you have a procedure library with 100 procedures in it that you include in your app, I was under the impression that the only binary ("p-code?") that gets put into your exe is the actual procedures that you call.
>

I don't think this is a true statement (for VFP). If you include a procedure in the project, it gets included in the .exe, even if those functions are never referenced in other places. VFP does not analyze function calls at compile time. < SNIP -- deleted erroneous sentence >

For C (and C++, I suppose), the answer is "sorta". Creating an .exe is a two-step process: compile, and link. Compiling creates object files. If an object file is explicitly included in a project, it is included in the .exe, whether or not it is called by other code. However, if the object files are placed into a library, they are only linked in if one of the functions are referenced in another object file. In this scenario, the entire object file (the one in the library) is linked into the .exe, even if only one of its functions is going to be called.

HTH,
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform