Author Topic: Modified & Improved wxWidgets Project Wizard  (Read 245543 times)

manutd

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #90 on: February 02, 2007, 01:09:59 am »
I'd just like to thank you for providing this wizard  :) Keep up the good work!

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #91 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.

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #92 on: February 02, 2007, 03:02:16 pm »
BTW, there is NO space in CB directory, nor in project directory, nor in wxWidgets directory.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Modified & Improved wxWidgets Project Wizard
« Reply #93 on: February 02, 2007, 03:03:50 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.

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.

Also post more details.
Be a part of the solution, not a part of the problem.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Modified & Improved wxWidgets Project Wizard
« Reply #94 on: February 03, 2007, 04:41:49 pm »
An update has been committed in Revision 3565.

Changes:
  • PCH Support for GCC was inadvertently disabled since Rev 7 of new wizard. This bug has been fixed.
  • Option has been provided to add custom header file for empty projects.
  • A newline has been added to the end of resource file to avoid warning messages in case of GCC

Known Issues:
  • PCH Support will not work for Empty projects created for GCC.
Be a part of the solution, not a part of the problem.

marlo_nl

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #95 on: February 04, 2007, 07:24:43 pm »
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

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Modified & Improved wxWidgets Project Wizard
« Reply #96 on: February 04, 2007, 07:52:38 pm »
Thanks for your feedback.

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?

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
« Last Edit: February 04, 2007, 07:54:51 pm by Biplab »
Be a part of the solution, not a part of the problem.

marlo_nl

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #97 on: February 04, 2007, 09:55:58 pm »
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

Offline saddam le pion

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Modified & Improved wxWidgets Project Wizard
« Reply #98 on: February 04, 2007, 10:01:19 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.

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.

Isn't CB able to compile a program AND its librairies?
« Last Edit: February 04, 2007, 10:03:10 pm by saddam le pion »

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Modified & Improved wxWidgets Project Wizard
« Reply #99 on: February 04, 2007, 10:53:04 pm »
Isn't CB able to compile a program AND its librairies?
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.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Modified & Improved wxWidgets Project Wizard
« Reply #100 on: February 05, 2007, 03:54:11 am »
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.

That's great.  :D I gave you alternate suggestion so that you do not need to add them manually. Please post your feedback after testing the workspace feature.

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.

I realised your problem and that's why I didn't ask you that question. ;) I follow similar principle for my project. While developing I use DLL for quick compilation and while distributing exe I recompile it with static wx lib and with gcc.

In my 2 PCs wxWidgets libs take almost 4 GB+ of space. Majority of these libs are used to test this wizard for any issues in Linux and Windows with different configurations. Fortunately the space is not problem for me. ;)

Isn't CB able to compile a program AND its librairies?

If you don't want to compile wxWidgets on your own, then download wxPack.
Be a part of the solution, not a part of the problem.

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #101 on: February 05, 2007, 09:48:42 am »
If you don't want to compile wxWidgets on your own, then download wxPack.

thanks, i will try.

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #102 on: February 05, 2007, 11:43:19 am »
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.

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.

Also post more details.

I finally managed to compile wxWidgets OK (no errors, no warnings) with mingw on XP.

In the config.gcc there is the line
BUILD = debug

so in you wizard i checked "Debug". But i got the message "A matching Debug configuration cannot be found in the wxWidgets directory you specified."

I'am confused.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Modified & Improved wxWidgets Project Wizard
« Reply #103 on: February 05, 2007, 11:51:09 am »
Wizard checks with the combination of options you've selected. The major parameters are Static/Dynamic-Ansi/Unicode-Non-monolithic/Monolithic. So BUILD=debug ensures a debug lib but it also depends upon three more variables namely SHARED=0/1 UNICODE=0/1 and MONOLITHIC=0/1. Check the values of these variables in the makefile and then select appropriate options. Wizard will not generate that warning.
Be a part of the solution, not a part of the problem.

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #104 on: February 05, 2007, 01:50:32 pm »
OK, thanks, it worked.
You should group these 4 major parameters in the same panel, and make this obvious. For example, gray the options that do not correspond to the compiled wxWidgets, if not too complex to do.