Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: p_lu on November 14, 2018, 08:06:30 pm

Title: Changing base include path (for wxWidgets project)
Post by: p_lu 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.
Title: Re: Changing base include path (for wxWidgets project)
Post by: oBFusCATed 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.
Title: Re: Changing base include path (for wxWidgets project)
Post by: p_lu 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.
Title: Re: Changing base include path (for wxWidgets project)
Post by: BlueHazzard 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...
Title: Re: Changing base include path (for wxWidgets project)
Post by: p_lu 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.
Title: Re: Changing base include path (for wxWidgets project)
Post by: oBFusCATed 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...