0

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?

2
  • maybe you need to create a .pro file and use qmake Commented Jan 10, 2014 at 19:00
  • I don't know how to add above parameters to make a qmake Commented Jan 10, 2014 at 19:06

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Many thanks to you man, you saved my day. At first I copied QtCore next to source code then gcc -O3 -fPIC --shared baifaao.cpp -o baifaao.so -I. It worked. I'm grateful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.