Hi All,
I have a function in my C file. This is a static function. I want to export this function in the windows DLL. for exporting this function i have it in .h file as
static int SPLIBRSYNC_API SayHello(int i);
If i compile my code without the .def file. it compiles successfully. No as i have to export this function. i put the entry of this function in the .def file as
LIBRARY MyDll
EXPORTS
SayHello @1
Now after adding the .def file, when i compile the project, i get the linker errors as
SPLibrSync.def : error LNK2001: unresolved external symbol SayHello
Debug/SPLibrSync.lib : fatal error LNK1120: 1 unresolved externals
LINK : fatal error LNK1141: failure during build of exports file
if i remove the static keyword from the .h and .c file. The project compiles successfully. So what might be the problem with static keyword for exporting.
Please help
Thanks



LinkBack URL
About LinkBacks



CornedBee