Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using .vcx compiled in one .exe by another .exe
Message
De
18/05/2001 11:50:52
 
 
À
18/05/2001 11:19:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00508751
Message ID:
00508776
Vues:
20
>Ok, I'm sure I'm missing something rather simple here, but I can't get this to work...
>
>My main custom class library gets compiled in with my main application, which all totals just under 1 MB. I know that's not large by any means, but I'm creating some utilities and a new module and would like to have them as their own .exes, no big deal. I've created a new project and added the main class library to it, but excluded it so that it won't compile in this new utility's .exe. The utility only consists of one prg and one form, and in the prg I've tried to include: SET CLASSLIB TO mainlib IN main.exe ADDITIVE ALIAS mainlib2. Well for whatever reason, I get a unrecognized phrase/keyword error when trying to use the ALIAS option. So I drop the ALIAS and everything compiles fine.
>
>When I run the main app and try to launch the utility from the menu, I get the "Error instantiating class. Cannot find ...\mainlib.vcx". Isn't it supposed to just use the library that was compiled in the main.exe??? Why can't FoxPro "find" it? The curdir() is right where the main.exe is so it knows the main.exe is right there...
>
>Is what I'm wanting to do even possible or do I have to include the class library in the compilation of all the utilities and new modules?
>
>
>Thanks for your help,
>
>- Brian

You don't have to - and don't want to - include the class library in every executable. The NEWOBJECT() function and NewObject methods allow you to specify the app that a class library is located in.
Dan LeClair
www.cyberwombat.com
SET RANT ON - The Wombat Blog

Life isn’t a morality contest and purity makes a poor shield. - J. Peter Mulhern
Disclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform