News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Changing base include path (for wxWidgets project)

Started by p_lu, November 14, 2018, 08:06:30 PM

Previous topic - Next topic

p_lu

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.

oBFusCATed

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!]

p_lu

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.

BlueHazzard

Quote from: p_lu on November 14, 2018, 08:47:18 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...

p_lu

Quote from: BlueHazzard on November 15, 2018, 11:44:13 AM
Quote from: p_lu on November 14, 2018, 08:47:18 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.

oBFusCATed

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!]