Jump to content
  • Advertisement
Sign in to follow this  
McZ

.lib functions exported in a .dll file

This topic is 5104 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

well... I have one main .dll that uses functions/classes from a .lib file in that .lib file there is a singelton class that stores some stuff.. and then I have another .dll file that the main .dll file uses as a plugin the problem is that both will use the .lib file functions/classes altough when the plugin .dll use the functions the stuff that the main .dll created isn't there, probibly becouse they have different memory space how can I make the library so that it will export its functions through the main dll file to the plugin dll file?! I'm using VS.Net 2003 if it has anything to do with it. EDIT: I get this error when compiling my plugin dll file LibraryCore.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class cMemoryObject & __thiscall cMemoryObject::operator=(class cMemoryObject const &)" (__imp_??4cMemoryObject@@QAEAAV0@ABV0@@Z) referenced in function "public: class cTask & __thiscall cTask::operator=(class cTask const &)" (??4cTask@@QAEAAV0@ABV0@@Z) the cMemoryObject class is located in the .lib file and the cTask class is located in the main dll file, both are defined as dllexports when compiling the main dll file else they are defined as dllimports

Share this post


Link to post
Share on other sites
Advertisement
Is your problem about using the singleton across DLLs? If so, singletons don't span across multiple processes, instead a new singleton will be created in each dll. You'll need to pass apointer to the child dll if you want to use the functionality it provides.

Share this post


Link to post
Share on other sites
now I can't get anything to work anymore :( I have found out about the singelton issue, and I have fixxed that problem but now I can't compile the plugin dll file

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!