In CodeBlocks I use different build targets in C::B for Linux and Windows. You can define the platform to be used for each build target which is very smart.
Now I have the problem that in Linux I get a very different structure after compiling than I got in Windows. For example I have multiple include folders and I am confused which one to use. My guesss is that this does not make sense and I had made some mistake at compiling. I checked the wiki for some guidelines, but I only found tips to use wx-configure for flags.
On Windows I am used to include the following directories in the UDE search paths (depending on the build target):
Code: Select all
($WX)
include/
msvc/wx/setup.h
wx # headers
lib/
gcc_lib/mswu # lib files
gcc_lib/mswud
gcc_dll/mswu
gcc_dll/mswud
Code: Select all
include/
gtl2/wx/setup.h
wx # headers
lib/
gtk2u_so
gtk2ud_so
Code: Select all
($WX)
include/
msvc/wx/setup.h
gtl2/wx/setup.h
wx # headers
lib/
gcc_lib # lib files
gcc_dll
gtk2u_so
gtk2ud_so
But after compilation I get this
Code: Select all
include/
msvc/wx/setup.h
gtl2/wx/setup.h
wx # headers
lib/
gtk2u_so
include/wx-2.9/wx # headers
lib/ # lib files
wx/
config/ # seems to be connected with wx-config
include/
gtk2-unicode.2.9/wx/setup.h
gtk2ud_so
include/wx-2.9/wx
lib/
wx/
config/
include/
gtk2-unicode.2.9/wx/setup.h
Code: Select all
mkdir build-gkt
cd build-gkt
make clean
../configure --with-gtk=2 --with-opengl --with-stl --prefix=$PWD/../lib/gtk2u_so
make
install
- did I do something wrong to end up with that structure? What is the correct way to do it?
- is that different by design for some specific reason? I
- what should I use for searth paths in CodeBlocks?
If there is some docu or a post explaining that thanks for pointing me there.
Edit:
I have found something in the wiki confirming the differences, but not getting into details. https://wiki.wxwidgets.org/Compiling_an ... ng_started. It does not give reasons why it has to be different and does not help to understand what paths would be needed.
There are two further links discussing wx-config (https://wiki.wxwidgets.org/Wx-Config, https://docs.wxwidgets.org/trunk/plat_gtk_install.html). From what I found there it is not clear how I can make CodeBlocks to use the wx config flags of only that local setup. It somehow involves setting the path to the bin subdirectory, but I am not sure where.
Specifically, the linked section says "From your IDE, you can simply put `wx-config --cxxflags` in compile flags and `wx-config --libs` in link flags" and "...a local wx-config will be created in the build directory. You can then simply get the flags by calling wx-config locally : ./wx-config. This can also help keeping different configurations truly separate and may avoid some conflicts." Its obvious how to so this on the command line, but how can I tell Codeblocks that for a specific BuildTarget it should use this local wx-config file? I guess its more a question for the codeblocks forum...