User forums > Help
Newbie problem in setting up wxwidgets and Codeblocks.
chiamko:
Hi All:
Apologies if this sounds too basic as I am really at a lost of what to do. I would like to do some programming with wxWidgets using Codeblocks as the IDE. I have downloaded CodeBlocks with MINGW complier V1.0 rc2. I have also downloaded WxMSW for wxWidgets2.8.0
From what I gathered from the Forum, I have also downloaded the nightly builts released on 2 March 2007 Rev3659. I am able to start Codeblocks by unzipping the nightly builts.
I then proceed to complie the wxWidgets library as instructed by
"http://www.wxwidgets.org/wiki/index.php/CodeBlocks_Setup_Guide"
After the compilation, a new directory was created under my wxwidgets directory like this
"<WXWIDGETS DIRECTORY>\lib\gcc_dll"
I did not amend any settings so far and I proceed to create a new wxWidgets project using the template available in Codeblocks. I am confuse at this point as the following few dialogs required checking/unchecking of some options which I am clueless about. One of the dialogs required the setting of wxWidgets library of which there are 3 options :
1. Use wxWidgets Dll
2. wxWidgets is built as a monolithic library
3. Enable Unicode
The next section required the setting for
1. Create empty project
2. Create and use precomplied header (PCH)
3. Configure advanced options
I am not sure which of the settings should be checked/unchecked.
At this point, when I clicked "next", a dialog will pop out to prompt me that
"A matching debug configuration cannot be found in the wxwidgets directory you specified ....."
I opt to ignore and just proceed. When I tried to build the project, the compilation was ok but the linking will have the following error
"Debug ===ld.exe:: cannot find -lwxmsw28d_core:: === Build finished: 1 errors, 0 warnings ==="
I am sorry if this is too confusing but basically I just would like to get started to code in wxwidgets using Codeblocks. As such, I really appreciate any help I can obtain here.
Thank you very much for your patience and guidance.
Biplab:
--- Quote from: chiamko on March 07, 2007, 05:30:42 pm ---I then proceed to complie the wxWidgets library as instructed by
"http://www.wxwidgets.org/wiki/index.php/CodeBlocks_Setup_Guide"
After the compilation, a new directory was created under my wxwidgets directory like this
"<WXWIDGETS DIRECTORY>\lib\gcc_dll"
I did not amend any settings so far and I proceed to create a new wxWidgets project using the template available in Codeblocks. I am confuse at this point as the following few dialogs required checking/unchecking of some options which I am clueless about. One of the dialogs required the setting of wxWidgets library of which there are 3 options :
1. Use wxWidgets Dll
2. wxWidgets is built as a monolithic library
3. Enable Unicode
--- End quote ---
These settings are wx lib settings and are vital. They will depend upon the build of wx lib that your system have. You'll find a build.cfg file inside <WXWIDGETS DIRECTORY>\lib\gcc_dll\msw{ud} directory. Open it with Notepad and find the following values.
* SHARED=1 Check the option, "1. Use wxWidgets Dll", else uncheck it.
* MONOLITHIC=1 Check the option, "2. wxWidgets is built as a monolithic library", else uncheck it.
* UNICODE=1 Check the option, "3. Enable Unicode", else uncheck it.
If you are in doubt of wx configuration, always do this small check. I hope this clears your doubt.
--- Quote from: chiamko on March 07, 2007, 05:30:42 pm ---The next section required the setting for
1. Create empty project
2. Create and use precomplied header (PCH)
3. Configure advanced options
--- End quote ---
You can safely ignore this section. This is provided for advanced users who want to tweak their project. You'll find them handy once you are more familiar with wxWidgets. :)
--- Quote from: chiamko on March 07, 2007, 05:30:42 pm ---At this point, when I clicked "next", a dialog will pop out to prompt me that
"A matching debug configuration cannot be found in the wxwidgets directory you specified ....."
--- End quote ---
It's a check which tells you that your system does not have Debug libraries of wxWidgets. So you can ignore this error. For your application please change your build target to Release and then build your project and it should build successfully. :)
Don't worry, once I was also confused like you and got help from many peoples. :)
Hopefully now you would be able to compile your application. In case of any more doubt, feel free to ask questions.
Regards,
Biplab
chiamko:
Hi:
Thank you so much for your prompt reply. I have changed the build target to "release" and it works!! However, does that mean I will no longer be able to debug my application?
Thank you very much
Biplab:
You have to compile wxWidgets in debug mode. If you've compiled on your own, then use BUILD=debug flag while compiling wx.
TDragon:
--- Quote from: Biplab on March 07, 2007, 07:01:30 pm ---You have to compile wxWidgets in debug mode.
--- End quote ---
This is not entirely accurate, as it is quite possible to build, with debug information (the -g flag), an app that uses a build of wxWidgets in non-debug mode. This is what Code::Blocks itself does, and is the reason for one of the wxWidgets wizard's advanced options -- when used, your app's debug target will use the same release build of wxWidgets that your release target does.
Navigation
[0] Message Index
[#] Next page
Go to full version