Question:
dev-c++ compilin error help?
beyoundgod
2008-05-03 08:13:51 UTC
well i alawy get this error

[Linker error] undefined reference to `WinMain@16'

ld returned 1 exit status

this is wat i have
#include
#include
#include
#include "stealth.h"

DWORD dwThreadID = 0;

void MainLoop()
{
while(1)
{


Sleep(10);
}

}


BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
if(ul_reason_for_call==DLL_PROCESS_ATTACH)
{

loadDriver("\\0001.sys",true,"0001","0001 Driver");
DWORD MainLoop (void * pdata);
if(unlinkThread((int)dwThreadID) != 1)
{
MessageBox(0,"Invalid Operating System Detected!","Error",MB_ICONERROR);
ExitProcess(0);
return FALSE;
}

return TRUE;
}
return TRUE;
}
Four answers:
S. B.
2008-05-03 08:59:30 UTC
If you're trying to write a DLL, create a DLL project instead of a regular executable-generating project.



S. B.
?
2016-11-07 03:53:45 UTC
you're lacking winmain () or significant() to start this methodology your code could be interior the style #includes #define file_specific_defines function_declarations worldwide variable declarations int winmain() or significant() { application defininitions and statements return something; }
anonymous
2008-05-03 08:36:04 UTC
if you're trying to create GUI program you need to include

int WinMain()

{

...... Main code here ......

}
anonymous
2008-05-03 08:20:32 UTC
Well, I don't see your main() at all. That is your problem:



int main()

{

//.....your code here

}


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...