Hi
I have a to link a shared library in my app
May I know what mistake I am doing
the pro file
#-------------------------------------------------
#
# Project created by QtCreator 2010-11-29T16:54:50
#
#-------------------------------------------------
QT += core gui
TARGET = GALLERY
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
settingstree.cpp \
displayframe.cpp \
PREVIEWFRAME.cpp \
PanelFrame.cpp \
eBeamTree.cpp \
MainFrame.cpp
HEADERS += mainwindow.h \
settingstree.h \
displayframe.h \
PREVIEWFRAME.h \
PanelFrame.h \
eBeamTree.h \
MainFrame.h
RESOURCES += \
GALL.qrc
unix:INCLUDEPATH += ../../libs
#unix {
# LIBS += -L ../libs/libAddFolder.so ../libs/libAddFolder.so.1 ../libs/libAddFolder.so.1.0 ../libs/libLinkFolder.so.1.0.0
#}
unix {
LIBS += -L ../../libs/libLinkFolder.so.1.0.0
}
unix {
# adding all these versions because Qt by default creates 3 levels of linking for version control
AddFolder.target = libAddFolder.so
AddFolder.commands = $(COPY) ../../libs/libAddFolder.so $$AddFolder.target
AddFolder.depends = ../../libs/libAddFolder.so
AddFolder1.target = libAddFolder.so.1
AddFolder1.commands = $(COPY) ../../libs/libAddFolder.so.1 $$AddFolder1.target
AddFolder1.depends = ../../libs/libAddFolder.so.1
AddFolder10.target = libAddFolder.so.1.0
AddFolder10.commands = $(COPY) ../../libs/libAddFolder.so.1.0 $$AddFolder10.target
AddFolder10.depends = ../../libs/libAddFolder.so.1.0
AddFolder100.target = libAddFolder.so.1.0.0
AddFolder100.commands = $(COPY) ../../libs/libAddFolder.so.1.0.0 $$AddFolder100.target
AddFolder100.depends = ../../libs/libAddFolder.so.1.0.0
QMAKE_EXTRA_TARGETS += AddFolder AddFolder1 AddFolder10 AddFolder100
POST_TARGETDEPS += libAddFolder.so libAddFolder.so.1 libAddFolder.so.1.0 libAddFolder.so.1.0.0
QMAKE_LFLAGS += -Wl,-rpath .
}
INSTALLS += AddFolder
#-------------------------------------------------
#
# Project created by QtCreator 2010-11-29T16:54:50
#
#-------------------------------------------------
QT += core gui
TARGET = GALLERY
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
settingstree.cpp \
displayframe.cpp \
PREVIEWFRAME.cpp \
PanelFrame.cpp \
eBeamTree.cpp \
MainFrame.cpp
HEADERS += mainwindow.h \
settingstree.h \
displayframe.h \
PREVIEWFRAME.h \
PanelFrame.h \
eBeamTree.h \
MainFrame.h
RESOURCES += \
GALL.qrc
unix:INCLUDEPATH += ../../libs
#unix {
# LIBS += -L ../libs/libAddFolder.so ../libs/libAddFolder.so.1 ../libs/libAddFolder.so.1.0 ../libs/libLinkFolder.so.1.0.0
#}
unix {
LIBS += -L ../../libs/libLinkFolder.so.1.0.0
}
unix {
# adding all these versions because Qt by default creates 3 levels of linking for version control
AddFolder.target = libAddFolder.so
AddFolder.commands = $(COPY) ../../libs/libAddFolder.so $$AddFolder.target
AddFolder.depends = ../../libs/libAddFolder.so
AddFolder1.target = libAddFolder.so.1
AddFolder1.commands = $(COPY) ../../libs/libAddFolder.so.1 $$AddFolder1.target
AddFolder1.depends = ../../libs/libAddFolder.so.1
AddFolder10.target = libAddFolder.so.1.0
AddFolder10.commands = $(COPY) ../../libs/libAddFolder.so.1.0 $$AddFolder10.target
AddFolder10.depends = ../../libs/libAddFolder.so.1.0
AddFolder100.target = libAddFolder.so.1.0.0
AddFolder100.commands = $(COPY) ../../libs/libAddFolder.so.1.0.0 $$AddFolder100.target
AddFolder100.depends = ../../libs/libAddFolder.so.1.0.0
QMAKE_EXTRA_TARGETS += AddFolder AddFolder1 AddFolder10 AddFolder100
POST_TARGETDEPS += libAddFolder.so libAddFolder.so.1 libAddFolder.so.1.0 libAddFolder.so.1.0.0
QMAKE_LFLAGS += -Wl,-rpath .
}
INSTALLS += AddFolder
To copy to clipboard, switch view to plain text mode
QT += gui \
core\
network \
xml
TARGET = AddFolder
TEMPLATE = lib
CONFIG += dynamic debug
SOURCES += main.cpp\
mainwindow.cpp \
browsemodel.cpp
HEADERS += mainwindow.h \
browsemodel.h
QT += gui \
core\
network \
xml
TARGET = AddFolder
TEMPLATE = lib
CONFIG += dynamic debug
SOURCES += main.cpp\
mainwindow.cpp \
browsemodel.cpp
HEADERS += mainwindow.h \
browsemodel.h
To copy to clipboard, switch view to plain text mode
Added after 45 minutes:
The library files gets created at the path
/home/kamlesh/Test/Libs
The Application needs to be created in
/home/kamlesh/Test/Gallery
Bookmarks