T
T
temagadfazer2018-12-08 20:42:41
linux
temagadfazer, 2018-12-08 20:42:41

Error compiling and linking the library to QT on Linux?

Good afternoon, for the second day I can not connect sfml to QT on Linux Mint. It's just desperation. SFML installed via repository, I don't know what else to do.. Help. .pro file:

QT       += core gui
 
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 
TARGET = test1
TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
CONFIG += link_pkgconfig
PKGCONFIG += sfml-all
 
SOURCES += \
        main.cpp \
 
 
        mainwindow.cpp
 
HEADERS += \
        mainwindow.h
 
FORMS += \
        mainwindow.ui
 
 
LIBS += -L"/home/artemon/C++/test1/SFML/lib/"
 
CONFIG(release, debug|release): LIBS += -lsfml-audio -lsfml-graphics -lsfml-network -lsfml-window -lsfml-system
CONFIG(debug, debug|release): LIBS += -lsfml-audio-d -lsfml-graphics-d -lsfml-network-d -lsfml-window-d -lsfml-system-d
 
INCLUDEPATH += "/home/artemon/C++/test1/SFML/include"
DEPENDPATH += "/home/artemon/C++/test1/SFML/include"

Error in build console:
21:55:50: Выполняются этапы для проекта test1...
21:55:50: Настройки не изменились, этап qmake пропускается.
21:55:50: Запускается: «/usr/bin/make» -j4
/home/artemon/Qt/5.12.0/gcc_64/bin/qmake -o Makefile test1.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
g++ -Wl,-rpath,/home/artemon/Qt/5.12.0/gcc_64/lib -o test1 main.o mainwindow.o moc_mainwindow.o   -L/home/artemon/C++/test1/SFML/lib/ -lsfml-audio-d -lsfml-graphics-d -lsfml-network-d -lsfml-window-d -lsfml-system-d -lsfml-graphics -lsfml-window -lsfml-audio -lsfml-network -lsfml-system -L/home/artemon/Qt/5.12.0/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread   
/usr/bin/ld: cannot find -lsfml-audio-d
/usr/bin/ld: cannot find -lsfml-graphics-d
Makefile:262: recipe for target 'test1' failed
/usr/bin/ld: cannot find -lsfml-network-d
/usr/bin/ld: cannot find -lsfml-window-d
/usr/bin/ld: cannot find -lsfml-system-d
collect2: error: ld returned 1 exit status
make: *** [test1] Error 1
21:55:57: Процесс «/usr/bin/make» завершился с кодом 2.
Ошибка при сборке/установке проекта test1 (комплект: Desktop Qt 5.12.0 GCC 64bit)
Во время выполнения этапа «Сборка»
21:55:57: Прошло времени: 00:08.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2018-12-08
@temagadfazer

LIBS += -L"/home/artemon/C++/test1/SFML/lib/debug"
LIBS += -L"/home/artemon/C++/test1/SFML/lib/release"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question