kenn
kenn

Reputation: 328

gcc how to add library path correctly?

I am on Ubuntu 13.04 32 bit platform. I want to compile a library to fix google earth missing panaramio picture frame.

 /* amirpli 2013/11/28 */
 #include <QtCore/QAtomicInt>
 extern "C" {
int _Z34QBasicAtomicInt_fetchAndAddOrderedPVii(QAtomicInt* a, int b) {
    return a->fetchAndAddOrdered(b);
     }
 }

I try to compile it with

gcc -O3 -fPIC --shared baifaao.cpp -o baifaao.so -IQtCore

But I get

baifaao.cpp:2:29: fatal error: QtCore/QAtomicInt: No such file or directory
compilation terminated.

Qt4 installed in my system

What should I do to compile it?

Upvotes: 0

Views: 1769

Answers (1)

pentadecagon
pentadecagon

Reputation: 4857

You appear to have added the directory QtCore to the include path. That's wrong, you have to add the parent directory to the include path: -ItheParentDirectoryOfQtCore, if it's the current directory then just -I. is sufficient.

Upvotes: 2

Related Questions