domlao
domlao

Reputation: 16029

Undefine symbol from Qt library

I create a static library using Qt library. But when I use this created static library and link to my application, then the problem is it will give me undefine symbol of QImage.

Please advise.

Many thanks.

some error message:

undefined reference to `QImage::~QImage()'

Upvotes: 0

Views: 272

Answers (2)

Jens
Jens

Reputation: 6329

You need to link the application with your library AND Qt libraries. You library is not linked to Qt.

Upvotes: 2

O.C.
O.C.

Reputation: 6829

When you create a a static library, it doesn't pull in everything from QT. It pulls in only the object files to satisfy the undefined symbols.

So you still need to link with QT libraries.

Upvotes: 1

Related Questions