Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 26
Registered: ‎09-20-2013
My Device: Z10
Accepted Solution

Problem using Qt library in static library

[ Edited ]

I created a Static Library with SDK 10.1 in Momentics 10.2. Any time I include any qt classes, the compiler complains that it can't find some file.

 

for example:

 

#include <qt4/QtCore/QString>

 

the error is: 

Description Resource Path Location Type
fatal error: QtCore/qchar.h: No such file or directory MyStaticLibrary line 45, external location: /Applications/Momentics.app/target_10_1_0_4828/qnx6/usr/include/qt4/QtCore/qstring.h C/C++ Problem

 

Please help.

New Member
Posts: 1
Registered: ‎10-03-2013
My Device: Z10

Re: Problem using Qt library in static library

I have a simular issue that solved by adding an include variable

${QNX_TARGET}/usr/include/qt4 into

Project / Properties / C/C++ Build / Settings /Tool Settings /QCC Compiler / Preprocessor / Include Directories (-I)
Contributor
Posts: 26
Registered: ‎09-20-2013
My Device: Z10

Re: Problem using Qt library in static library

[ Edited ]

Yeah, I found out the same thing later. another way to add the include path is to do it in the project properties. Just add the qt4 path to all configurations should solve the problem. but sometimes, after adding the path, you need to clean and rebuild the project to make it work. Otherwise, it may not pick up the path properly.