Author Topic: Few Questions regarding wxWidgets project wizard of Code::Blocks?  (Read 4913 times)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Hi,

I was modifying the wxWidgets project wizard in Code::Blocks. I was confused in some points.

1. Why does the wizard generates Debug Build Target as Console application? Is there any special purpose?

This is creating trouble with Borland Compiler as a particular compiler settings has to be turned on for proper linking.

2. Can we remove the option highlighted in following image?



I found the option to be a bit strange. E.g, if the option is checked then application (Linked with Debug build of wxWidgets) will have two build targets, (i) Debug Debug and (ii) Debug Release.

 :?
« Last Edit: December 21, 2006, 03:26:11 pm by biplab »
Be a part of the solution, not a part of the problem.

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: Few Questions regarding wxWidgets project wizard of Code::Blocks?
« Reply #1 on: December 21, 2006, 06:58:13 pm »
1. Why does the wizard generates Debug Build Target as Console application? Is there any special purpose?

In wxGTK, wxLogDebug dumps to the console. So it is really helpful to have a console start up even when you are making a GUI application.
I don't know if that was the intent with the wizard, but that is why I like it.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Few Questions regarding wxWidgets project wizard of Code::Blocks?
« Reply #2 on: December 21, 2006, 07:13:32 pm »
1. Why does the wizard generates Debug Build Target as Console application? Is there any special purpose?

In wxGTK, wxLogDebug dumps to the console. So it is really helpful to have a console start up even when you are making a GUI application.
I don't know if that was the intent with the wizard, but that is why I like it.

Yes, that was exactly the intent. Only not specific for wxLogDebug but for simple printf()'s too ;).
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Few Questions regarding wxWidgets project wizard of Code::Blocks?
« Reply #3 on: December 21, 2006, 07:32:54 pm »
Thanks for your replies.  :D

But I have asked another question in 2nd point. How to solve that? Means how can we justify the Release build of an application which itself is compiled and linked with Debug build of wxWidgets?  :?

I am novice regarding Linux. So I didn't know the purpose. I think there should be a better way to handle the Linux related problem.
Be a part of the solution, not a part of the problem.

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: Few Questions regarding wxWidgets project wizard of Code::Blocks?
« Reply #4 on: December 21, 2006, 09:51:55 pm »
Quote
I am novice regarding Linux. So I didn't know the purpose. I think there should be a better way to handle the Linux related problem.

I don't think that your second question is specific to Linux.

I do think the option regarding the use of the debug libraries is confusing. I think the option should be removed, debug builds should link against debug libraries, release builds should link against release libraries.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Few Questions regarding wxWidgets project wizard of Code::Blocks?
« Reply #5 on: December 22, 2006, 02:50:10 am »
Quote
I am novice regarding Linux. So I didn't know the purpose. I think there should be a better way to handle the Linux related problem.

I don't think that your second question is specific to Linux.

I meant to say that if we need wxLogDebug() function, we can keep some option in the wizard to enable building the debug version as Console Application. That might be a better way of handling this Linux specific purpose (though printf() exists in Windows too,  :D).

I am also in favour of removing that option.
Be a part of the solution, not a part of the problem.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Few Questions regarding wxWidgets project wizard of Code::Blocks?
« Reply #6 on: December 22, 2006, 03:10:46 pm »
I do think the option regarding the use of the debug libraries is confusing. I think the option should be removed, debug builds should link against debug libraries, release builds should link against release libraries.

that is not intended - if you just want to debug your application and don't want to debug the wxWidgets library,
there is no need to build your debug-build using the wx-debug-library.

the option should stay as it is



Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Few Questions regarding wxWidgets project wizard of Code::Blocks?
« Reply #7 on: December 22, 2006, 04:42:18 pm »
the option should stay as it is


Well tiwag you don't like the idea. I agree with your point to keep that. But this works well with GCC, but with Borland there's some problem.

For a new wx user, the option is very confusing as I've stated in previous posts. Already wx is confusing enough for users. Different build config, lot of errors for one missing library, and so on.

I have a suggestion. What if we change the option to "Compile Debug target in Console mode" (or some better sentence) and let the wizard take care of it? By default the wizard will create GUI app but if you check the option it will create Console mode app. I think this will make all of us happy.  :D

that is not intended - if you just want to debug your application and don't want to debug the wxWidgets library,
there is no need to build your debug-build using the wx-debug-library.

But I use MSVC and use wx release dll version for my app. It creates one pdb file and allows me to do (basic) debugging.
Be a part of the solution, not a part of the problem.