Error 102 error LNK2005: _DllMain@12 already defined in b0fdll(test).obj

Hi guys
I'm writting a dll under VS2010 but when i want to compile it i got
"Error 102 error LNK2005: _DllMain@12 already defined in b0fdll(test).obj"

so what i'm suppose to do with it ? i just googled it but i didn't come up with any good result ......

source code :

#include "stdafx.h"
//#include <Windows.h>
#include <stdio.h>

BOOL APIENTRY DllMain
(
HINSTANCE hinstDLL, //handle to DLL module
DWORD fdwReason, // reason for calling the function
LPVOID lpReserved // Reserved
)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
printf("Process pid=(%d) loading DLL\n",GetCurrentProcessId());
break;

}

}

Regards ;)

Well, it says you already defined DllMain somewhere else.
Last edited on
I know , but i didn't do this .... so does anyone know how to solve it ?
I assume you have a source file called b0fdll(test).cpp or similar? What are their contents? More specifically: Does this file contain a definition of DllMain()? If yes, what happens when you remove it?
Topic archived. No new replies allowed.