Problemer med DLL
Har en klasse som skal pakkes ind i en DLL.min mail.cpp ser sådan ud
---
// oracleDLL.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "oracle.h"
extern "C" __declspec(dllexport)bool execute();
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
bool execute()
{
return true;
}
---
Kan godt compile når #include "oracle.h" er udkommenteret. oracle er den klasse som jeg gerne vil kunne kalde funktioner i. Får følgende fejl når den ikek er udkommenteret.
---
c:\program files\microsoft visual studio\vc98\include\stdlib.h(281) : error C2059: syntax error : 'constant'
c:\program files\microsoft visual studio\vc98\include\stdlib.h(281) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
c:\program files\microsoft visual studio\vc98\include\stdlib.h(281) : see declaration of '_calloc_dbg'
c:\program files\microsoft visual studio\vc98\include\stdlib.h(283) : error C2059: syntax error : 'constant'
c:\program files\microsoft visual studio\vc98\include\stdlib.h(283) : error C2733: second C linkage of overloaded function '_free_dbg' not allowed
c:\program files\microsoft visual studio\vc98\include\stdlib.h(283) : see declaration of '_free_dbg'
c:\program files\microsoft visual studio\vc98\include\stdlib.h(298) : error C2059: syntax error : 'constant'
c:\program files\microsoft visual studio\vc98\include\stdlib.h(298) : error C2733: second C linkage of overloaded function '_malloc_dbg' not allowed
c:\program files\microsoft visual studio\vc98\include\stdlib.h(298) : see declaration of '_malloc_dbg'
c:\program files\microsoft visual studio\vc98\include\stdlib.h(306) : error C2059: syntax error : 'constant'
c:\program files\microsoft visual studio\vc98\include\stdlib.h(306) : error C2733: second C linkage of overloaded function '_realloc_dbg' not allowed
c:\program files\microsoft visual studio\vc98\include\stdlib.h(306) : see declaration of '_realloc_dbg'
---
Nogen der har en løsning?