Hi All,

I want to create a statically linkable lib file using MASM32. For example I want to export a function ExpFunc from my lib, which will be statically linked to one of my win32 applications (a console with MFC). My batch file for creating the lib looks like this:

\masm32\bin\ml.exe /c /coff %1.asm
\masm32\bin\lib /def:%1.def %1.obj

I have imported the lib into my VC project, and also tried adding all of these options:

extern void ExpFunc();
void __stdcal ExpFunc();
extern "C" void ExpFunc();

Still am getting the linker error LNK2019: unresolved external symbol: of not able to resolve this function.

Thanks in advance!
Posted on 2009-04-11 22:44:48 by KoderJoe
ExpFunc proc PUBLIC

extern "C" void __stdcall ExpFunc();
Posted on 2009-04-12 18:14:07 by Ultrano
Also, you don't need a .def file, try without it.
Posted on 2009-04-12 18:15:13 by Ultrano
Hi All, Thank you very much for the response. Awesome, its working!!! Cool :D
Posted on 2009-04-12 19:19:46 by KoderJoe