Jump to content
  • Advertisement
Sign in to follow this  
indigox3

Linking a static lib to a DLL

This topic is 4841 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

I've got a static lib that I want to use in a DLL, however I'm getting some undefined external symbol errors during linking, when I call some methods defined in the static lib from the DLL code. error LNK2019: unresolved external symbol "__declspec(dllimpo rt) public: __thiscall foo::bar(void) ... Checking what symbols been defined in the static lib I have: "public: __thiscall foo::bar(void) .... Would the __declspec(dllimport) make a difference?

Share this post


Link to post
Share on other sites
Advertisement
I don't think you want to use dllimport unless you're trying link a DLL into your static lib.


Share this post


Link to post
Share on other sites
Yup, that was the problem, the header file from the static lib, that I #included from the DLL source should not have defined dllimport.

Thanks

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!