Hello,
I have a h- and a cpp-file with some calculations used in many of my projects.
Now I tried to put them in a separate dll, so the files should not be included in every project.
When linking I get a LNK2001 (unresolved symbol) error for a struct, however lib and dll are in the right place.
I use the
#ifdef TOOLS_EXPORTS
#define TOOLS_API __declspec(dllexport)
#else
#define TOOLS_API __declspec(dllimport)
#endif
macro, which works fine for a couple of methods.
The struct is defined like that
TOOLS_API typedef struct {
char Name[128];
} uTSystem;
And in the files using this struct from the dll its also defined correctly(?)
extern uTSystem ABC;
The error message is:
error LNK2001: Nichtaufgeloestes externes Symbol "struct uTSystem ABC" (?ABC@@3UuTSystem@@A)
Any hints? Thank you