Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MetaKnight

Love/Hate DLL Class Problem stuff

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

Alright i got this in my classstuff.h #ifdef MY_DLL #define MY_DLL_API __declspec(dllimport) #else #define MY_DLL_API __declspec(dllexport) #endif class MY_DLL_API fPolygon { LPDIRECT3DVERTEXBUFFER9 v; public: ~fPolygon(); int loadf(); int draw(int polys); }; and it gives me this error: StarFoxGame error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall fPolygon::~fPolygon(void)" (__imp_??1fPolygon@@QAE@XZ) referenced in function _$E2 and this one: StarFoxGame error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall fPolygon::loadf(void)" (__imp_?loadf@fPolygon@@QAEHXZ) referenced in function _WinMain@16 and thoes erores are in the program im using the dll in [edited by - MetaKnight on July 2, 2003 6:37:36 PM]

Share this post


Link to post
Share on other sites
Advertisement
Interesting. Make sure you compile the DLL under multithreaded DLL linking.

-----
#ifdef __cplusplus
extern "C"
{
#endif

class MY_DLL_API fPolygon
{
virtual ~fPolygon();
...
}

#ifdef __cplusplus
}
#endif

#endif
-----

Kuphryn

Share this post


Link to post
Share on other sites
When you build the DLL, it should create a my_dll.dll file and also a my_dll.lib file. Make sure you include this *.lib in your game project.

ToohrVyk

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!