Problems adding static library QT project

Posted by Smek on Stack Overflow See other posts from Stack Overflow or by Smek
Published on 2014-06-10T09:20:07Z Indexed on 2014/06/10 9:24 UTC
Read the original article Hit count: 231

Filed under:
|
|
|
|

I have problems adding a static library to my Qt project. I have two project one is my static library and the other one is a Qt GUI project. As I add all classes to my GUI project as c++ or header files everything works just fine but I want this to be in a separate library. When I select the option to add a library I check External library then I select the .a file I have build and the folder where my header files can be found because I am working on a Mac I select Mac as the target platform. Then I click continue and then done.

macx: LIBS += -L$$PWD/../../MyLib/build-MyLib-Desktop_Qt_5_2_1_clang_64bit-Debug/ -lMyLib
INCLUDEPATH += $$PWD/../../MyLib/build-MyLib-Desktop_Qt_5_2_1_clang_64bit-Debug/include
DEPENDPATH += $$PWD/../../MyLib/build-MyLib-Desktop_Qt_5_2_1_clang_64bit-Debug/include
macx: PRE_TARGETDEPS += $$PWD/../../MyLib/build-MyLib-Desktop_Qt_5_2_1_clang_64bit-Debug/libMyLib.a

When I build my GUI project I get the following error:

The process "/usr/bin/make" exited with code 2.

Can anyone tell me what the problem can be and how to resolve the problem?

Thanks

© Stack Overflow or respective owner

Related posts about c++

Related posts about osx