Hi, I want to create lib/dll with exports from already existing c code, so I placed this dll snippet into the code and both functions plusI and plusF are exported fine.
In which code? In the library? or this is a new sample library?
BOOL APIENTRY DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH: break;
case DLL_THREAD_ATTACH: break;
case DLL_THREAD_DETACH: break;
case DLL_PROCESS_DETACH: break;
}
return TRUE;
}
__declspec(dllexport) int __cdecl plusI(int a, int b) { return a + b; }
__declspec(dllexport) double __cdecl plusF(double a, double b) { return a + b; }
This is your library?
However when I add __declspec(dllexport) int ... to any other function from the original code there is no error but the export in created dll does not exist.
Which original code?
Do you mean that your sample library works and some other code not?
Sorry, but is not clear at all.
Post a sample minimal project that shows the problem.