Author Topic: Changing base include path (for wxWidgets project)  (Read 396 times)

Offline p_lu

  • Single posting newcomer
  • *
  • Posts: 3
Changing base include path (for wxWidgets project)
« on: November 14, 2018, 08:06:30 pm »
I have a wxWidgets project under Codeblocks and want to change the -I (include) and -L (library) paths.
I know about the Settings->Compiler->Search_directories and Projects->Build_options->Search_directories
settings areas, but they don't do what I need to do.

In particular, the Build log shows:

g++ -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D ... ...

and I need to replace the /usr/include with /usr/local/include (different wxWidgets version).

Changing the Seach_directories do not affect this.

I have searched the Web and in this forum to find the answer, but did not come across anything
useful.  I have tried various configuration items in Codeblocks and looked for config files in
the project area and found nothing useful.

Where does Codeblocks store this stuff?


Also, there is some description that Codeblocks allows setting at the Global (compiler) level,
the project level, and the target level.  The items mentioned above seem to be about global
and project settings.  Where is the target settings?


Thanks for any and all help.
« Last Edit: November 14, 2018, 08:11:11 pm by p_lu »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11279
    • Travis build status
Re: Changing base include path (for wxWidgets project)
« Reply #1 on: November 14, 2018, 08:14:26 pm »
Search for wx-config calls in you project and replace them with /usr/local/.../wx-config. Replace the dots with the correct path to the wx-config file.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline p_lu

  • Single posting newcomer
  • *
  • Posts: 3
Re: Changing base include path (for wxWidgets project)
« Reply #2 on: November 14, 2018, 08:47:18 pm »
Thank you so much.  This is one of those things where grepping doesn't help, since it's
all indirect.

Looks like Codeblocks defaults to /usr/bin/wx-config to get the --cflags and --libs values.

I just have to explicitly tell it to use /usr/local/bin/wx-config.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2105
Re: Changing base include path (for wxWidgets project)
« Reply #3 on: November 15, 2018, 11:44:13 am »
Looks like Codeblocks defaults to /usr/bin/wx-config to get the --cflags and --libs values.

I just have to explicitly tell it to use /usr/local/bin/wx-config.

Codeblocks does not defaults, your system defaults to...

Offline p_lu

  • Single posting newcomer
  • *
  • Posts: 3
Re: Changing base include path (for wxWidgets project)
« Reply #4 on: November 15, 2018, 05:30:16 pm »
Looks like Codeblocks defaults to /usr/bin/wx-config to get the --cflags and --libs values.

I just have to explicitly tell it to use /usr/local/bin/wx-config.

Codeblocks does not defaults, your system defaults to...

Could you tell me how the "system default" is set?  It doesn't seem to inherit environment
variables such as PATH, since my PATH gives preference to /usr/local/bin over /usr/bin.

I'm confused by GUIs, with the number of places where configuration info can be set.

Also, there's mention of Global settings, Project settings, and Target settings in Codeblocks.
Where is Target settings, or has it been deprecated?

Thanks.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11279
    • Travis build status
Re: Changing base include path (for wxWidgets project)
« Reply #5 on: November 15, 2018, 08:10:45 pm »
Projects have one or multiple targets. Every target can have its own settings. So no, target settings haven't been deprecated.
Project -> Build options and Project -> Properties to inspect both project and target settings...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]