Love/Hate DLL Class Problem stuff

Started by
1 comment, last by MetaKnight 20 years, 9 months ago
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]
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
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

This topic is closed to new replies.

Advertisement