OK im trying to build a dll using visual c++ 2003 and DarkGDK (latest version) to make a simple command that creates a cube. The GDK works; i can run the spinning cube sample and compile it and it works with no errors or warnings, its just in dlls it dosn\'t work. I have this code:
#include \"DarkGDK.h\"
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define MYCOMMAND __declspec ( dllexport )
MYCOMMAND void PrintText( LPSTR pCaption , LPSTR pMessage )
{
if(pMessage)
{
MessageBox(NULL, pMessage, pCaption, MB_OK);
}
}
MYCOMMAND void MakeCube( )
{
dbMakeObjectCube ( 1 , 100);
}
and i get the following from the compiler:
MyTestDLL error LNK2005: _DllMain@12 already defined in LIBCMTD.lib(dllmain.obj)
MyTestDLL warning LNK4006: _DllMain@12 already defined in LIBCMTD.lib(dllmain.obj); second definition ignored
MyTestDLL fatal error LNK1169: one or more multiply defined symbols found
when the dbmakecube is remmed out, the dll compiles without issue. can anyone help?