Compile+Build with external gcc
-
Hello,
I want to build a QT console application with external gcc toolchain (created with the crosstool-ng project)
and not with the default gcc installed on my Centos 5.8Is it possible ?
I need external gcc because my application will run under kernel 2.6.27.35
The toolchain was build using this kernel headers.Centos 5.8 runs with a patched 2.6.18 kernel.
Thanks,
Zvika -
It is. If you are using Qt Creator, use Tools and Kits to set up your toolchain. If you are using just qmake, you need to adjust one of the mkspecs (or create your own) from <install dir>/mkspecs so that it uses the compiler you want, and then run your project with:
@
qmake -spec name-of-your-makespec
make
@ -
You will need to edit the mkspec when using qmake (provided your GCC is not called gcc/g++), even if you point creator to the right tool chain: Unfortunately we can not set the compiler name that qmake will use:-/ That needs to be changed in the mkspec.
The path to the compiler will be set by creator.
-
What is this "external gcc" you are talking about? I am not aware of any internal one, so I keep wondering:-)
-
Hello,
The "external gcc" is a gcc toolchain built with crosstool-ng project (1.5.2).
This toolchain was used to build the kernel (2.6.27.35), device driver and application.I think all libraries I'm using (e.g QT) should also built with this toolchain.
Am I right ?Thanks,
Zvika