Qmake.pro file is not processed correctly to generate LD_LIBRARY_PATH

In recent days, I have been trying to understand how qmake works, I am stuck. I need a project with the following structure:

root

  • Ben
    • testjson
  • Lib
    • libjson.so
  • CSI
    • testjson.cpp

All I wanted was to check out the json library. I created a new empty project in Qt Creator 2.3.0 and configured all the settings so that the executable is executed. Tested what I wanted and closed the application.

Later, when I opened Qt Creator again, I downloaded the .pro file and was surprised when I try to start the project, I get this message: "The executable file is not specified" .: | In this case, I went to the project tab and selected the executable file manually, but, as expected, when I tried to start it, I got the message "error loading shared libraries: libjson.so: cannot open shared object file: file or directory" . This was expected since LD_LIBRARY_PATH is not set (it looks like I ran it from cli).

, .pro , , "", : "Parsing.pro file", , , LD_LIBRARY_PATH Qt Creator .pro.

: .pro ?

.pro:

!include(../../common.pri){
    error(Couldn't find the common.pri file!)
}

TEMPLATE = app

SOURCES += testjson.cpp
CONFIG += console
TARGET = testjson

CONFIG(release, debug|release) {
    DESTDIR = $$BinaryDir/Release
} else {
    DESTDIR = $$BinaryDir/Debug
}

LIBS += -L$$LibraryDir -ljson

INCLUDEPATH += $$DefaultInclude
DEPENDPATH += $$LibraryDir

PS: , LD_LIBRARY_PATH , , .

+1
1

, , qmake (.pro) , . .pro BUILD, . .pro .

, Qt Creator, RUNTIME. , LD_LIBRARY_PATH. Qt Creator .

[ Qt Creator 2.2, 2.3]

,

  • "" .
  • " "
  • " " " " "", .
  • "..." "LD_LIBRARY_PATH" .

, . [ ".user", ".pro".]

, " ", LD_LIBRARY_PATH.

+3

All Articles