Author Topic: why Code::Blocks can not find "wx/setup.h"?  (Read 4275 times)

Offline surefire

  • Multiple posting newcomer
  • *
  • Posts: 15
why Code::Blocks can not find "wx/setup.h"?
« on: April 01, 2007, 11:24:24 am »
If I unchecked the "Configure Advance Options" when creating a new wxWidgets project, Code::Blocks will notify me that it can not find the wx/setup.h file during building. But if checked, nothing is wrong.

I want to know how does this setting "Configure Advance Options" effect my application?

thanks in advance!

Alex

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2290
Re: why Code::Blocks can not find "wx/setup.h"?
« Reply #1 on: April 01, 2007, 02:17:42 pm »
This also happens to me. Even though I use just a "plain jane" wx dll.
When I ignore the message, every thing works just fine.

@biplab.

I've never understood this situation. It seems so confusing to me.
What am I suppose to understand. If I check the box I get the error message. If I *uncheck* the box I get the message any way.

It works. It compiles. It makes no sense. I think I'm dumb.


Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: why Code::Blocks can not find "wx/setup.h"?
« Reply #2 on: April 01, 2007, 04:22:54 pm »
The situation is as follows.

1. You check the option Configure Advanced Options and create a Project. The project will have two targets (Debug and Release) and both will be linking against Release lib of wx by default. This option works only for GCC. So if you create a project and both your targets link properly then you have Release lib of wx in your system.

2. You uncheck that option and create a project. In this case:
  • Debug target will link against Debug lib of wx
  • Release target will link against Release lib of wx

@surefire
My guess is your system have Release lib of wx and you are trying to build the Debug target of project which is linked against debug lib of wx (when you uncheck the option Configure Advance Options).

@Pecan
In your case, debug wx lib is present and thus when you check that option, wizard adds Release lib to Debug target.

If you still face the problem, please attach a sample project file which produces error and one more which does not.

BTW, I've assumed that you are using Windows. If you are using Linux, then the explanation will be different.

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline surefire

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: why Code::Blocks can not find "wx/setup.h"?
« Reply #3 on: April 02, 2007, 05:01:34 am »
Thank you,Biplab

you are right, my system has only the release lib of wx.
if I want to add any other libs such as wx XML Lib,wx ODBC lib and so on, whether should I uncheck "Configure Advanced Option"?

Alex

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: why Code::Blocks can not find "wx/setup.h"?
« Reply #4 on: April 02, 2007, 05:08:21 am »
if I want to add any other libs such as wx XML Lib,wx ODBC lib and so on, whether should I uncheck "Configure Advanced Option"?

In Monolithic build, not all these libraries are created, rather they are embedded in one mammoth library. Thus if you select Use Monolithic build option in wizard then it won't show you options to add these extra libraries. But if you uncheck that option, you'll get a page where you can add them.

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline surefire

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: why Code::Blocks can not find "wx/setup.h"?
« Reply #5 on: April 02, 2007, 08:54:53 am »

In Monolithic build, not all these libraries are created, rather they are embedded in one mammoth library. Thus if you select Use Monolithic build option in wizard then it won't show you options to add these extra libraries. But if you uncheck that option, you'll get a page where you can add them.

Regards,

Biplab

I got it, thanks a lot!