Author Topic: Error while building c::b --> undefined reference to `MAIN__'  (Read 4191 times)


  • Guest
Error while building c::b --> undefined reference to `MAIN__'
« on: February 22, 2006, 11:04:25 pm »

I was trying to build code::blocks out of the latest svn sources (Revision 2061) using wxWidgets-2.6.2 (Unicode) and a precompiled version of code::blocks (taken from http://paginas.....). I used the guide found at --> "Building unicode wxWidgets & CodeBlocks"

Everything works fine until it comes to the point where all objects are linked together, at this point I get the error:

C:\Programme\minGW\lib\libfrtbegin.a(frtbegin.o)(.text+0x41):main.c: undefined reference to `MAIN__'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 20 seconds)
1 errors, 0 warnings

I'm doing all this stuff on a Windows XP machine using MinGW (gcc 3.4.2) -- is there anyone who please could help me?
« Last Edit: February 22, 2006, 11:13:30 pm by z0ttel »

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Error while building c::b --> undefined reference to `MAIN__'
« Reply #1 on: February 22, 2006, 11:41:00 pm »
The only thing that comes to mind for that particular error message is a corrupted or outdated MinGW installation. I'd recommending wiping your Code::Blocks and MinGW directories, installing MinGW again (using the latest 5.0.2 installer from, and installing one of Code::Blocks' nightly builds. - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)