User forums > Using Code::Blocks
Changing base include path (for wxWidgets project)
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.
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.
--- End quote ---
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.
--- End quote ---
Codeblocks does not defaults, your system defaults to...
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page
Go to full version