Hi Guys and Girls,
I am receiving the LNK2019 and LNK2001 errors on my DLL project within Visual C++.
The compilation is fine, so for now I have assumed the code is "ok". The usual thing to do would be to check the Linker, Input dependencies within the Project Configuration, however I have included the relevant Library here.
This DLL project includs a header file "xyz.h", the relevant xyz.dll is present in the directory, and the "xyz.lib" file has been added to the Project Configuration.
There is one method getSomething, that returns an auto_ptr, its prototype is within the "xyz.h" file and has been implemented in the DLL somewhere. Some other methods that are implemented in the DLL with a header file prototype causes no errors when building, it is only this one which is problematic.
# define FOOAPI __declspec(dllexport)
# define FOOAPI __declspec(dllimport)
A macro like the one above is used for the getSomething method and a few others (which do not causes a problem).
If I create a normal win32 application (native c++) I can use ALL the functions etc from the DLL fine. Only when creating a DLL do I have problems. I want to create a DLL that I can PInvoke from a .NET language.
I do not have access to the code at the moment, but will provide some code snippets which will make clearer what I am trying to say. Hope someone can shed some light on this matter (although I know its probably difficult without code or the compete Linker error...Thanks!