User forums > Using Code::Blocks
I feel stupid but... (SOLVED)
Satch:
First of all say HI!!! :)
This is a question that makes me feel stupid since it is one of those asked trillion times and answered trillion times, but I failed to find that answer in the forums with the search tool above.
I'm using code::blocks with MSVC2003 toolkit and MSDK. To be sure all would work fine from start I followed the MSVC toolkit integration tutorial to set up lib and include paths properly.
I tested the settings with a simple console project (yes, default compiler MSVC2003) and no problems compiling neither linking.
When I replaced the "main" identifier with "winmain" the problem shown up:
"error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup"
it's clear that it is a missing library, but can't figure out which one since the MSDK libraries paths are all correct (checked like 10 times).
Any help would be welcome and I beg your pardon if there's already a post about this issue elsewhere in the forums.
Thx in advance :)
sethjackson:
--- Quote from: Satch on January 24, 2006, 02:52:51 am ---First of all say HI!!! :)
This is a question that makes me feel stupid since it is one of those asked trillion times and answered trillion times, but I failed to find that answer in the forums with the search tool above.
I'm using code::blocks with MSVC2003 toolkit and MSDK. To be sure all would work fine from start I followed the MSVC toolkit integration tutorial to set up lib and include paths properly.
I tested the settings with a simple console project (yes, default compiler MSVC2003) and no problems compiling neither linking.
When I replaced the "main" identifier with "winmain" the problem shown up:
"error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup"
it's clear that it is a missing library, but can't figure out which one since the MSDK libraries paths are all correct (checked like 10 times).
Any help would be welcome and I beg your pardon if there's already a post about this issue elsewhere in the forums.
Thx in advance :)
--- End quote ---
Ok what version of C::B RC2, SVN-HEAD? Could you post some code and the libs you are linking in? You did include windows.h right... :lol:
EDIT:
There is a template for Windows GUI programs too. :wink:
takeshimiya:
You need to change the "subsystem".
Menu Project->Properties->Targets tab.
In Select build target options->Type: change from "Console application" to "GUI application".
But anyways, I wonder why you want to use WinMain as the entry point. Are you programming with MFC?
sethjackson:
--- Quote from: Takeshi Miya on January 24, 2006, 03:29:09 am ---You need to change the "subsystem".
Menu Project->Properties->Targets tab.
In Select build target options->Type: change from "Console application" to "GUI application".
But anyways, I wonder why you want to use WinMain as the entry point. Are you programming with MFC?
--- End quote ---
Uhh WinMain is for Win32 API programming....... Not MFC (AFAIK)......
takeshimiya:
--- Quote from: sethjackson on January 24, 2006, 03:31:20 am ---Uhh WinMain is for Win32 API programming....... Not MFC (AFAIK)......
--- End quote ---
It is used, but internally, AFAIK.
Navigation
[0] Message Index
[#] Next page
Go to full version