User forums > Using Code::Blocks
Whenever I add a class I get "Undefined reference to WinMain"
JohnnyCrow:
Sorry for the late reply. Here's what you asked for:
1. I created a new project (just a console project).
2. Without changing any of the default code, I created a new class.
3. I added it to the current project.
4. I added the #include directive in main.cpp, and upon attempting to build the project, the 'undefined reference to WinMain@16' error appears.
5. I saved the project, closed it, and reopened it again.
6. When rebuilding the project, it works fine.
Not sure why this works, but closing the project and reopening it (or restarting Code::Blocks) solves the problem consistently.
oBFusCATed:
Can someone else try these steps on windows and then tell me if the problem can be reproduced?
oBFusCATed:
JohnnyCrow: Can you try to reproduce the bug using the latest nightly build?
Can you show the list of plugins you have enabled?
BlueHazzard:
i can't reproduce this bug with a nightly (probably -10~20 commits) on win7
oBFusCATed:
BlueHazzard: Can you try with the 13.12 release?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version