Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Modified & Improved wxWidgets Project Wizard
marlo_nl:
Biplab,
Thanks for the wxWidgets Wizard.
It's extremly useful for "newbies" like me who are just getting on the learning curve of making a GPL development toolset to work.
I've been browsing the internet for about a month now before setting up a toolset consisting of the Codeblocks IDE, the MinGW compiler and the wxWidgets framework.
I took me quite some time to succesfully build a first "Hello World" wxWidgets application in CodeBlocks and in the end I managed with the help of the Rev5 wizard.
As a "newbie" I would like to know if it would be possible to modify your wizard to allow different wxWidgets library types to be used for Debug and Release Builds.
If I'm correct the wizard currently will use the same library type (either Shared or Static) for both the Release Build and the Debug build.
My question is the following:
Would it be possible to extend the wizard such that the user can select different project options (Use wxWidgets DLL, wxWidgets is built as a monolithic library and Enable unicode) for Release Builds and for Debug Builds?
Regards, Marlo
Biplab:
Thanks for your feedback.
--- Quote from: marlo_nl on February 04, 2007, 07:24:43 pm ---If I'm correct the wizard currently will use the same library type (either Shared or Static) for both the Release Build and the Debug build.
My question is the following:
Would it be possible to extend the wizard such that the user can select different project options (Use wxWidgets DLL, wxWidgets is built as a monolithic library and Enable unicode) for Release Builds and for Debug Builds?
--- End quote ---
You are correct. It uses same type of libraries (shared or static) for both release and debug target.
It is somewhat difficult. Because the way script system works it may not be possible easily. I'll keep your request in mind but honestly I can't promise you. :)
For the time being you can use alternate method. Use workspace.
* First create one wx project with one lib config, le's say static-unicode-non-monolithic. Keep this project open.
* Create second wx project with another lib config, let's say dll-unicode-monolithic. You've to create it in a different folder.
* Now remove generated source (if you've ur own source) and add same source to both the projects.
* Now save the workspace from File > Save workspace menu. From next time onwards, open the workspace and code::blocks will load both the projects.
You can uncheck the appropriate target for appropriate projects. E.g., if you wish that the first project will be built in debug mode then uncheck release target during project creation.
I agree that my suggestion may not be the best one, but it should work. :D
Regards,
Biplab
marlo_nl:
Biplab,
Thanks for your quick reply.
For a newbie like me Squirrel and scripting Codeblocks is new as well :)
Therefore I have no feel for what the impact of my request would be. But from your reply I understand that it's not straightforward.
Forgot to mention that I did manage to set up a project where Release Target and Build Target use different library types.
The project uses a shared library for the Debug Target and a static library for the Release Target.
The project was created the wxWidgets wizard with the "Use wxWidgets DLL" check box checked.
I changed the following "Project build options" manually:
a) In the Compiler tab moved #define WXUSINGDLL from "Project" (settings used for both Debug and Release Target) to "Debug"
b) Release Target - Linker tab
added Link libraries: libwxmsw28u.a, comctl32, gdi32, ole32, oleaut32 and uuid
c) Release Target - Directories tab
Compiler tab: change <path>\wxWidgets-2.8.0\lib\gcc_dll\mswud to
<path>\wxWidgets-2.8.0\lib\gcc_lib\mswu
Linker tab: change <path>\wxWidgets-2.8.0\lib\gcc_dll to
<path>\wxWidgets-2.8.0\lib\gcc_lib
Resource compiler tab: change <path>\wxWidgets-2.8.0\lib\gcc_dll\mswud to
<path>\wxWidgets-2.8.0\lib\gcc_lib\mswu
With these changes the Debug Target and the Release Target build succesfully.
I'll also check your suggestion to see which "trick" is easiest to use.
A short remark for other newbies who might think "why would you like different library types in the first place?"
For Release Targets I prefer to have an executable that doesn't depend on DLL files, hence the static library.
For the Debug Target I could use a static wxWidgets debug library. But the static wxWidgets library has a big disadvantage (when compiled with MinGW GCC) if you are short on HDD space: it is huge, about 360 MByte. The shared wxWidgets library "only consumes" about 75 MByte.
Regards, Marlo
saddam le pion:
--- Quote from: Biplab on February 02, 2007, 03:03:50 pm ---
--- Quote from: ascxaxsvcbsxbbqvcxqsbcvxs on February 02, 2007, 02:38:14 pm ---I downloaded CB revision 3558, and installed it in a new directory, with the two extra dlls.
I downloaded wxWidgets version 2.8.0 then 2.6.3
I used the wizard to create lots of different non-empty projects. For each one, I compiled the project immediately, with the standard compiler, without modifying anything. I created some of them with 2.8.0, others with 2.6.3.
Some projects with or without unicode, with or without debug, or with release, ... I tried lot of the options available.
All projects generated more than 50 errors.
Most of them are in chkconf.h.
The first is usually "wxUSE_EXCEPTIONS must be defined."
then lots of wxUSE_ constants seem not defined.
--- End quote ---
Did you compile wxWidgets?? You have downloaded the source of wxWidgets which needs to be compiled. It seems that compiler can't find setup.h.
--- End quote ---
Isn't CB able to compile a program AND its librairies?
TDragon:
--- Quote from: saddam le pion on February 04, 2007, 10:01:19 pm ---Isn't CB able to compile a program AND its librairies?
--- End quote ---
Technically speaking, C::B isn't able to compile anything. (GCC, or whatever other compiler you choose, does the footwork.) That said, large libraries generally come with their own specific method of compilation, and wxWidgets is no exception to this rule. The C::B wiki contains straightforward instructions on how to compile wxWidgets.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version