Problems adding library to qt project

0

I am currently trying to include the rtmidi library in a project from qt to bind to a graphical interface system that I created it with Midi messages.

I added the following line to my project:

#include <RtMidi.h>

In the * .pro, file you can read the following :

TEMPLATE = app

QT += qml quick
CONFIG += c++11

INCLUDEPATH += _files_3rdParty/rtmidi

SOURCES += src/main.cpp

LIBS += -L"_files_3rdParty/rtmidi" -lrtmidi

SOURCES += main.cpp \
    _files_3rdParty/rtmidi/doc/doxygen/samples/getting_started.cpp \
    _files_3rdParty/rtmidi/tests/cmidiin.cpp \
    _files_3rdParty/rtmidi/tests/midiclock.cpp \
    _files_3rdParty/rtmidi/tests/midiout.cpp \
    _files_3rdParty/rtmidi/tests/midiprobe.cpp \
    _files_3rdParty/rtmidi/tests/qmidiin.cpp \
    _files_3rdParty/rtmidi/tests/sysextest.cpp \
    _files_3rdParty/rtmidi/RtMidi.cpp \
    _files_3rdParty/rtmidi/rtmidi_c.cpp

RESOURCES += qml.qrc

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

DISTFILES += \
    _files_3rdParty/rtmidi/autogen.sh \
    _files_3rdParty/rtmidi/rtmidi-config.in \
    _files_3rdParty/rtmidi/msw/rtmidilib.vcproj \
    _files_3rdParty/rtmidi/doc/images/ccrma.gif \
    _files_3rdParty/rtmidi/doc/images/mcgill.gif \
    _files_3rdParty/rtmidi/doc/doxygen/footer.html \
    _files_3rdParty/rtmidi/doc/doxygen/header.html \
    _files_3rdParty/rtmidi/doc/doxygen/Doxyfile.in \
    _files_3rdParty/rtmidi/doc/doxygen/tutorial.txt \
    _files_3rdParty/rtmidi/doc/release.txt \
    _files_3rdParty/rtmidi/msw/rtmidilib.sln \
    _files_3rdParty/rtmidi/tests/cmidiin.dsp \
    _files_3rdParty/rtmidi/tests/midiout.dsp \
    _files_3rdParty/rtmidi/tests/midiprobe.dsp \
    _files_3rdParty/rtmidi/tests/qmidiin.dsp \
    _files_3rdParty/rtmidi/tests/RtMidi.dsw \
    _files_3rdParty/rtmidi/tests/sysextest.dsp \
    _files_3rdParty/rtmidi/rtmidi.pc.in \
    _files_3rdParty/rtmidi/README.md \
    _files_3rdParty/rtmidi/msw/readme

HEADERS += \
    _files_3rdParty/rtmidi/configure.ac \
    _files_3rdParty/rtmidi/RtMidi.h \
    _files_3rdParty/rtmidi/rtmidi_c.h

I have a series of warnings and an error that tells me that there is no rule to compile src of main.o

What am I doing wrong?

    
asked by anonymous 07.11.2016 / 13:09

1 answer

0

I ended up by including the project as:

#include <RtMidi.h>

Making Library Linking in Resources

and adding the following code to the * .pro file

TEMPLATE = app

QT += qml quick
CONFIG += c++11

INCLUDEPATH += _files_3rdParty/rtmidi/

SOURCES += main.cpp \

RESOURCES += qml.qrc

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

DISTFILES += \

HEADERS += \
    
07.11.2016 / 14:23