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

Offline Biplab

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

It's a good suggestion. I'll group them.  :D

Out of these 4 major parameters, 1 parameter is decided by the target(s) you've checked in the Compiler selection page. I'll group the remaining 3 parameters.
Be a part of the solution, not a part of the problem.

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #106 on: February 05, 2007, 03:04:06 pm »
One more question: after compilation & execution OK, i tried to add one character in the title of the window, an acute letter. I got the message "Illegal byte sequence".

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Modified & Improved wxWidgets Project Wizard
« Reply #107 on: February 05, 2007, 03:17:53 pm »
One more question: after compilation & execution OK, i tried to add one character in the title of the window, an acute letter. I got the message "Illegal byte sequence".

Probably you need to compile your app with Unicode build of wxWidgets lib.  :)
Be a part of the solution, not a part of the problem.

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #108 on: February 05, 2007, 03:27:00 pm »
i did it from the beginning. That's why i'm little bit surprised!
« Last Edit: February 05, 2007, 03:30:47 pm by ascxaxsvcbsxbbqvcxqsbcvxs »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Modified & Improved wxWidgets Project Wizard
« Reply #109 on: February 05, 2007, 03:53:11 pm »
One more question: after compilation & execution OK, i tried to add one character in the title of the window, an acute letter. I got the message "Illegal byte sequence".

GCC needs to be told the character set used in your code. The compiler option is named "-finput-charset" and takes the encoding as argument. The default value is "-finput-charset=utf-8" (if I 'm not mistaken).
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Modified & Improved wxWidgets Project Wizard
« Reply #110 on: February 05, 2007, 04:36:30 pm »
wx lib configurations are conveniently grouped now. See the following screenshot for more details. The changes are Windows specific.



Committed in Revision 3570.

Thanks ascx.....
« Last Edit: February 05, 2007, 04:42:13 pm by Biplab »
Be a part of the solution, not a part of the problem.

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #111 on: February 05, 2007, 04:41:23 pm »
One more question: after compilation & execution OK, i tried to add one character in the title of the window, an acute letter. I got the message "Illegal byte sequence".

GCC needs to be told the character set used in your code. The compiler option is named "-finput-charset" and takes the encoding as argument. The default value is "-finput-charset=utf-8" (if I 'm not mistaken).

With this option, must i compile wxWidgets, just my application, or both?
Is this option available in CB, like Settings|compiler? i didn't find it.
« Last Edit: February 05, 2007, 05:00:31 pm by ascxaxsvcbsxbbqvcxqsbcvxs »

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #112 on: February 05, 2007, 04:59:12 pm »
wx lib configurations are conveniently grouped now. See the following screenshot for more details. The changes are Windows specific.



Committed in Revision 3570.

Thanks ascx.....

It is better, but for newbies, i think you should slightly modify the messages, to point out that
=> the first group represent the past (how wxWidgets was compiled)
=> while the second group is the future (what you want your project to be).

marlo_nl

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #113 on: February 05, 2007, 11:08:57 pm »
Hi Biplab,

I can confirm that your alternative method (described below) can be used to create a Debug Target based on a shared wxWidgets Debug Library and a Release Target based on a static wxWigets library.


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


For those who don't like to create two seperate projects to support a Debug Target based on a shared wxWigets library and Release Target based on a static wxWidgets library you can do the following:

  • Use the method above.
  • Carefully investigate the build options generated by the wxWidgets Wizard for both projects (Debug and Release).
  • This will learn you how to merge (manually edit) the build options of a single project in such a way that it supports a Debug Target based on a shared wxWigets library and Release Target based on a static wxWidgets library.


Regards, Marlo

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Modified & Improved wxWidgets Project Wizard
« Reply #114 on: February 06, 2007, 04:22:35 am »
Thanks marlo_nl for the feedback.  :)
Be a part of the solution, not a part of the problem.

Offline saddam le pion

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Modified & Improved wxWidgets Project Wizard
« Reply #115 on: February 07, 2007, 08:42:37 am »
One more question: after compilation & execution OK, i tried to add one character in the title of the window, an acute letter. I got the message "Illegal byte sequence".

GCC needs to be told the character set used in your code. The compiler option is named "-finput-charset" and takes the encoding as argument. The default value is "-finput-charset=utf-8" (if I 'm not mistaken).

With this option, must i compile wxWidgets, just my application, or both?
Is this option available in CB, like Settings|compiler? i didn't find it.

Good question! as it seems to be here lots of non-english developers, who develop non-english applications. This implies almost automatically source codes with "special" letters, so source codes with utf8.
So we want our CB to automatically accept utf8 (or having to parameter it just one time for all), not having to parameter the compiler manually for each source file of each application...
« Last Edit: February 07, 2007, 08:48:58 am by saddam le pion »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Modified & Improved wxWidgets Project Wizard
« Reply #116 on: February 07, 2007, 11:40:21 am »
GCC uses UTF-8 unless told otherwise...
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #117 on: February 07, 2007, 12:34:15 pm »
GCC uses UTF-8 unless told otherwise...

1) I installed CB version 3565 on XP
2) I installed wxWidgets 2.8.0 and compiled it with gcc with unicode => OK
3) use of the wizard to generate a basic application with unicode => compile and execute OK with gcc
4) Then without modifying any CB option anywhere, i just add the special letter é to the title of the windows:

original line, generated by the wizard
azeFrame* frame = new azeFrame(0L, _("wxWidgets Application Template"));
modified line, for beginning to test the unicode support
azeFrame* frame = new azeFrame(0L, _("wxWidgets Application Templateé"));

no other modification except this character => i got the compile message "Illegal byte sequence".

5) If i suppress this character => compile OK
6) I've now tried several times with last build 3577 => same problem, but the error message is now
"converting to execution character set: Invalid argument"
« Last Edit: February 07, 2007, 03:03:28 pm by ascxaxsvcbsxbbqvcxqsbcvxs »

ascxaxsvcbsxbbqvcxqsbcvxs

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #118 on: February 07, 2007, 04:06:54 pm »
GCC uses UTF-8 unless told otherwise...

with Dev-C++ I have no problem with the special letters: so i don't think it is a compiler problem.

yesidh

  • Guest
Re: Modified & Improved wxWidgets Project Wizard
« Reply #119 on: February 07, 2007, 10:11:02 pm »
I'm using mingw compiled wxWidgets using the ./configure not using the makefile.gcc that comes with wxWidgets because someone it didn't work dor me. The make file generated me the files and I copied to the $wxWIN/lib/gcc_lib

The point is that the libraries generated are like this: libwx_base-2.8.a

Seeing the wizard.script in the codeblock, I can see that the wizard looks for something like libwxbase28.a according to my setting. So I modified the 3586 SVN and it is now working. Am I the only one with this issue?.

Thanks.