[Edit: Resolved the problem! sorry for bothering you!]
Just got a new problem, this time a dll issue.
My project is a dll file. Under debug settings, my external testing program has no problem to open it. Under release settings however, the program properly loads the dll file, however, fails to find the (only) function that the dll provides.
The function is declared as:
file: rootSA.cpp
1 2 3 4
|
__declspec(dllexport) void _stdcall TestFunctionC(int* rankG, int* NumRoots, int* x, int* output)
{
/*some code here*/
}
|
I also have a .def file included in the project:
file: rootSA.def
1 2 3 4
|
LIBRARY rootSA
EXPORTS
TestFunctionC
|
My compiler options are:
/O2 /Oi /GL /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "ROOTSA_EXPORTS" /D "_WINDLL" /FD /EHsc /MD /Gy /Fo"Release\\" /Fd"Release\vc90.pdb" /W3 /nologo /c /Zi /TP /errorReport:prompt
My linker options are:
/OUT:"C:\math\rootFKFT\cpp\Release\rootSA.dll" /INCREMENTAL:NO /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"Release\rootSA.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"c:\math\rootFKFT\cpp\Release\rootSA.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Has anyone had a similar problem? Thanks in advance!
[Edit:] I just added
/DEF:".\rootSA.def"
order to the linker and it all worked! sorry for the fuss...