How to add macro for the LIBS in the .PRO file
-
I tried for Xenomai OS but the message($$QMAKESPEC) is not printing at . Donno why ? and i am struck
@ManiRon said in How to add macro for the LIBS in the .PRO file:
I tried for Xenomai OS but the message($$QMAKESPEC) is not printing at . Donno why ? and i am struck
Hi! What
Qt
version do you use onXenomai
? The problem might be because it can't find the compiler. -
@ManiRon said in How to add macro for the LIBS in the .PRO file:
I tried for Xenomai OS but the message($$QMAKESPEC) is not printing at . Donno why ? and i am struck
Hi! What
Qt
version do you use onXenomai
? The problem might be because it can't find the compiler.@Cobra91151 using 4.7 version QT in xenomai
-
@Cobra91151 using 4.7 version QT in xenomai
So, for example you should check the directory:
...\Qt\4.7\mingw53_32\mkspecs
Here is what I get:
Xenomai
is built with theLinux
kernel, so you should try all the possible scope conditions forlinux
. Also, what compiler do you use onXenomai
? It will help to find it faster. -
So, for example you should check the directory:
...\Qt\4.7\mingw53_32\mkspecs
Here is what I get:
Xenomai
is built with theLinux
kernel, so you should try all the possible scope conditions forlinux
. Also, what compiler do you use onXenomai
? It will help to find it faster.how to check the compiler sir?
-
how to check the compiler sir?
You can check the compiler:
Tools
=>Options
=>Kits
=>Compilers
in theQt Creator
.For example:
Are you sure you can build the empty project on
Xenomai
? -
You can check the compiler:
Tools
=>Options
=>Kits
=>Compilers
in theQt Creator
.For example:
Are you sure you can build the empty project on
Xenomai
?Will check and say sir
-
Will check and say sir
OK. By the way, I have another solution to your problem but I can't check it because older
Qt
->Q_WS*
macros were dropped in favour ofQ_OS*
. So I will add both solutions for older and newerQt
versions.You can add macros in the code to check the
OS
and load libs for example onWin
OS:Qt 5.x:
#ifdef Q_OS_WIN #pragma comment(lib, "yourlibforwin") #elif Q_OS_LINUX #pragma comment(lib, "yourlibforlinux") #else #pragma comment(lib, "yourlibforxenomai") #endif
Docs: http://doc.qt.io/qt-5/qtglobal.html
Qt 4.x
#ifdef Q_WS_WIN #pragma comment(lib, "yourlibforwin") #else #pragma comment(lib, "yourlibforlinux") #endif
-
OK. By the way, I have another solution to your problem but I can't check it because older
Qt
->Q_WS*
macros were dropped in favour ofQ_OS*
. So I will add both solutions for older and newerQt
versions.You can add macros in the code to check the
OS
and load libs for example onWin
OS:Qt 5.x:
#ifdef Q_OS_WIN #pragma comment(lib, "yourlibforwin") #elif Q_OS_LINUX #pragma comment(lib, "yourlibforlinux") #else #pragma comment(lib, "yourlibforxenomai") #endif
Docs: http://doc.qt.io/qt-5/qtglobal.html
Qt 4.x
#ifdef Q_WS_WIN #pragma comment(lib, "yourlibforwin") #else #pragma comment(lib, "yourlibforlinux") #endif
@Cobra91151 said in How to add macro for the LIBS in the .PRO file:
comment
can i implement this in the .PRO file?
-
@Cobra91151 said in How to add macro for the LIBS in the .PRO file:
comment
can i implement this in the .PRO file?
No, you can't have it in the
.pro
file. So what about the compiler? Have you built the empty project onXenomai
? -
No, you can't have it in the
.pro
file. So what about the compiler? Have you built the empty project onXenomai
?Not yet checked . Once i check it will inform u sir.