I have a program that requires a dll called qcode32.dll. The program is just two files: demo.cpp and qcode32.h which has the type definition used for the dll fuction calls. I also have qcode32.lib.
The qcode32.h goes something like this:
>typedef struct { ... } POSTREC;
>void __declspec (dllimport) QCODE32(POSTREC * postrec, int parm);
and the demo.cpp goes something like this:
>#include qcode32.h
>main()
>{
>...
>QCODE32((POSTREC *)&x, y);
>...
>}
Now I can compile this by running from the command line:
>cl demo.cpp qcode32.lib
But I can't make a project that will compile. I open the .cpp in vc++ and tell it to build and then vc++ creates a default project for me. I add the .h. Then I go to project->setting->link and add qcode32.lib, but when I build I get the error:
>error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl QCODE32(struct POSTREC *,int)" (__imp_?QCODE32@@YAXPAUPOSTREC@@H@Z)
Can anyone tell me how to set up a simple project that will compile this? (I have a larger project that I want to integrate with this dll)
The qcode32.h goes something like this:
>typedef struct { ... } POSTREC;
>void __declspec (dllimport) QCODE32(POSTREC * postrec, int parm);
and the demo.cpp goes something like this:
>#include qcode32.h
>main()
>{
>...
>QCODE32((POSTREC *)&x, y);
>...
>}
Now I can compile this by running from the command line:
>cl demo.cpp qcode32.lib
But I can't make a project that will compile. I open the .cpp in vc++ and tell it to build and then vc++ creates a default project for me. I add the .h. Then I go to project->setting->link and add qcode32.lib, but when I build I get the error:
>error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl QCODE32(struct POSTREC *,int)" (__imp_?QCODE32@@YAXPAUPOSTREC@@H@Z)
Can anyone tell me how to set up a simple project that will compile this? (I have a larger project that I want to integrate with this dll)