Hi,
I have the following problem. I would like to use the static libs of SFML, not the dynamic ones.
However, my project is a DLL (the DLL is intended to be used in another language), so the static SFML libs need to be linked against the dll.
I'm using Visual C++ Express 2008, and get the following errors:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Clock::clock(void)" (__imp_??0Clock@sf@@QAE@XZ) referenced in function "public: __thiscall cSomeClass::cSomeClass(void)"
The class in the static library looks like this:
class cSomeClass
{
public:
cSomeClass(void){ m_Clock = new sf::Clock(); }
~cSomeClass(void){ delete m_Clock; }
private:
sf::Clock* m_Clock;
};
Is there something I'm missing? From what I've found on google, linking static libs into DLLs is a royal pain.
I also came across the linker option used in GCC
--whole-archive, which would force the inclusion of the entire static library and resolve the problem above. What is the equivalent in VC++?
Do I need to do something with SFML_SYSTEM_EXPORTS to make everything visible to the DLL?
Thanks,
TheComet