User forums > Help

undefined reference to 'WinMain@16

<< < (2/2)

stahta01:

--- Quote from: colnelb on December 19, 2012, 01:32:39 am ---I downloaded the latest version of Code::Blocks and installed the compiler that came with the download, MinGW.  I am having the same problem. "undefined reference to 'WinMain@16'.  I went to the MinGW blog site and found a reference to requiring to turn on the "mwindows flag".  I have attempted and was unable to find a "compiler flag" "mwindows" anywhere in the compiler settings provided through the installed Code::Blocks IDE.

--- End quote ---

Edit: "latest version of Code::Blocks" means nothing to me; post the version number!!

If you are trying to create a GUI program read this link.

http://forums.codeblocks.org/index.php/topic,7906.0.html
(Edit2: Look at the other linker option in the Image)
(Edit3: Project -> "Build Options" Tab: Linker Settings)

If you are NOT trying to create a GUI program; what are you trying to do?

Tim S.

colnelb:
I found something interesting.  There is a problem with Code::Blocks in that it does not verify that the project/workspace folders/files are not read only before it calls the compiler and attempts to compile the project code.  I spend days "going down the rabbit hole" researching the spurious error message seen in the subject line before I found that the restored project/workspace folder from a prior project had been restored as "read only".  When the permissions were fixed, the project compiled without error.  Check the permissions on your project/workspace folders and files.

Navigation

[0] Message Index

[*] Previous page

Go to full version