I am using Visual Studio 5.0
I have DLL and a static library . My intention is to use a static function that is defined in the static library . I have included the header file in the intended source cpp and also given the path in the project dependencies . Still it gives me linker errors .
Following is the linker error
error LNK2019: unresolved external symbol “public: static bool __cdecl gph::IsA(class PtOnDemand &,wchar_t const *)” (?IsA@gph@@SA_NAAVPtOnDemand@@PB_W@Z) referenced in function “private: int __thiscall PtXMLP::HandleObjectBegin(char const *,char const * *)” (?HandleObjectBegin@PtXMLP@@AAEHPBDPAPBD@Z)
1>.\ReleaseU/epptxml.dll : fatal error LNK1120: 1 unresolved externals
Any suggestions
It could be that the linker is not finding your function because it is compiled with different settings. Like release vs debug, unicode vs non-unicode, differences in calling conventions. That may cause the name to be mangled differently. If the .h file is written in c, not c++, you might need to disable name mangling altogether by wrapping the prototypes in