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: 20
Registered: ‎07-23-2013
My Device: Z10
My Carrier: *
Accepted Solution

Problems including QObject

[ Edited ]

Hello,

 

I have a fresh static library project, inside it... a TestObject.h file. I added the QtCore library via the "Add Library..." method hoping it would solve my issue. Below is my class... 

 

#ifndef TESTOBJECT_H_
#define TESTOBJECT_H_

#include <QObject>

class TestObject {

public:
	TestObject();
	virtual ~TestObject();
};

#endif /* TESTOBJECT_H_ */

This compiles, until I include <QObject> as seen above.

 

The following is the compiler error output, what am I doing wrong?

 

In file included from /Applications/bbndk/target_10_1_0_4633/qnx6/usr/include/qt4/QtCore/QObject:1:0,

                 from ../src/TestObject.h:11,

                 from ../src/TestObject.cpp:8:

/Applications/bbndk/target_10_1_0_4633/qnx6/usr/include/qt4/QtCore/qobject.h:47:32: fatal error: QtCore/qobjectdefs.h: No such file or directory

compilation terminated.

 

Thank you

D

Contributor
Posts: 20
Registered: ‎07-23-2013
My Device: Z10
My Carrier: *

Re: Problems including QObject

I managed to solve the problem by including the qt4 base directory amongst my includes.

 

 

I hope this helps someone.