LNK2019
unresolved external symbol "__declspec(dllimport) int __cdecl interpreter(class GwCore *,
class GwEvent *, class GwUD cont&)" (__imp_?
interpreter@@YAHPAVGwCore@@PAVGwEvent@@ABVGwUD@@@Z) referenced in function
"void __cdecl `dynamic initializer for 'func_test"(void)" (?? __Efunc_test@@YAXXZ)
LNK2019
unresolved external symbol _WinMain@16 referenced in function "int __cdecl
invoke_main(void)" (?invoke_main@@YAHXZ)
File: MSVCRTD.lib(exe_winmain.obj)
It has to do something with the includes. The gw is from Grit a very old framework. I am working with Visual Studio 2019
I have dllimport defined in some files if it helps:
#define GWOCC_API __declspec(dllimport)
#endif
// This class is exported from the gwocc.dll
class GWOCC_API Cgwocc {
public:
Cgwocc(void);
// TODO: add your methods here.
};
extern GWOCC_API int ngwocc;
GWOCC_API int fngwocc(void);
3. hpp file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifdef GWOCC_EXPORTS
#define GWOCC_API __declspec(dllexport)
#else
#define GWOCC_API __declspec(dllimport)
#endif
// This class is exported from the gwocc.dll
class GWOCC_API Cgwocc {
public:
Cgwocc(void);
// TODO: add your methods here.
};
extern GWOCC_API int ngwocc;
GWOCC_API int fngwocc(void);
how old? I assume you have a .lib or something to use your dlls, and if they were compiled too far back, you may have a 32 bit vs 64 bit problem, that is, the library isnt readable and so it can't find what is in there...
> unresolved external symbol _WinMain@16
iirc, that happens when you don't chose «console aplication» as your project type
> unresolved external symbol `interpreter(...)'
> referenced in function `func_test(void)'
¿are those your functions?
¿where are they defined?
¿did you add those files to your project?