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

z0ttel

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

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 http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29 --> "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:

Quote
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 mingw.org), and installing one of Code::Blocks' nightly builds.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)