Im a trying to use pantheios logging framework from inside a c++ dll. I have successfully built the dll and it executes through my test application (C++ MFC Application).
I have used implicit linking with the following includes:
#include <pantheios/implicit_link/core.h>
#include <pantheios/implicit_link/fe.simple.h>
#include <pantheios/implicit_link/be.console.h>
My DllMain initializes pantheios with the following calls:
extern "C" const char PANTHEIOS_FE_PROCESS_IDENTITY[] = "FinishingLineController";
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
{
int panres = pantheios::pantheios_init();
if(panres < 0)
{
fprintf(stderr, "Failed to initialise the Pantheios libraries: %s\n",
pantheios::pantheios_getInitErrorString(panres));
return FALSE;
}
}
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
pantheios::pantheios_uninit();
break;
}
return TRUE;
}
When I execute the following code I get an
Microsoft C++ exception: stlsoft::winstl_project::windows_exception at memory location 0x0013da84
pantheios::log_DEBUG("Test logging");
I have tried to use explicit linking instead without any result.