Qwt framework not found - qt

Good Morning,
I am currently trying to build a project in QT that uses the Qwt library. However, when I try to build the project I get
warning: directory not found for option '-F/usr/local/qwt-6.1.0/lib'
error:framework not found qwt
error:linker command failed with exit code 1
I have followed the steps in this post as well as this post but it still cannot find the framework
I am using Xcode 6, Qwt 6, QT 5.3, and Mac OSX 10.9.
My .pro file's relevant code is as follows:
#mac: QMAKE_MAC_SDK.macosx.path = Applications/Xcode.app/Contents/Developer/Patforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
#mac: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 #Added to help build QWT
#INCLUDEPATH += /usr/local/qwt-6.1.0/qwt.prf
include (/usr/local/qwt-6.1.0/qwt.prf )
#CONFIG += qwt
#macx:QMAKE_MAC_SDK += macosx10.9
QMAKEFEATURES += /usr/local/qwt-6.1.0/features
CONFIG += qwt
#mac:INCLUDEPATH += /Library/Frameworks/qwt.framework/Headers
#mac: INCLUDEPATH += /usr/local/qwt-6.1.0/src
mac: INCLUDEPATH += /usr/local.qwt-6.1.0/lib/qwt.framework/Headers
linux-g++:INCLUDEPATH += /usr/local/qwt-5.2.1/include
win32:INCLUDEPATH += C:/Qwt-5.2.1/include
FORMS += ui/
UI_HEADERS_DIR = inc_ui
OBJECTS_DIR = obj
MOC_DIR = moc
#mac:LIBS += /usr/local/qwt-6.1.0/lib -framework qwt
#mac:LIBS += -l /usr/local/qwt-6.1.0/lib/qwt.framework
mac:LIBS += -F /usr/local/qwt-6.1.0/lib -framework qwt
linux-g++:LIBS += /usr/local/qwt-5.2.1/lib/libqwt.so
win32:LIBS += C:/Qwt-5.2.1/lib/qwt5.dll
Any help is appreciated,
Thanks.

Related

Qt compile error : glib/galloca.h not found in glib-2.0/glib.h

I've the following error during Qt compiling phase :
In file included from ../test_ble2/main.cpp:12:
/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux/usr/include/glib-2.0/glib.h:30:10: fatal error: glib/galloca.h: No such file or directory
30 | #include <glib/galloca.h>
compilation terminated.
make: *** [Makefile:723: main.o] Error 1
looking for *.h and I found it on the board so the problem seems in *.pro file :
QT += quick
LIBS += -lbluetooth
LIBS += -lpython3
LIBS += -llibglib-2.0
SOURCES += \
main.cpp
RESOURCES += qml.qrc
QML_IMPORT_PATH =
QML_DESIGNER_IMPORT_PATH =
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
packagesExist(glib-2.0) {
CONFIG += link_pkgconfig
PKGCONFIG += glib-2.0
}
HEADERS += \
include/gattlib.h
unix:!macx: LIBS += -L$$PWD/lib/ -lgattlib
INCLUDEPATH += $$PWD/include
DEPENDPATH += $$PWD/include
but I' dont fix it, any suggestion?
The platform is yocto form imx8.
Any suggestion? Thanks in advance

Why lupdate not include qml qstr string into .ts file?

I have this .pro file :
TEMPLATE = subdirs
SUBDIRS += internal app
app.depends = internal
app.subdir = src/app
internal.subdir = src/internal
TRANSLATIONS = \
$$PWD/translations/croatian.ts \
$$PWD/translations/danish.ts \
$$PWD/translations/english.ts \
$$PWD/translations/french.ts \
$$PWD/translations/german.ts \
$$PWD/translations/italian.ts \
$$PWD/translations/norwegian.ts \
$$PWD/translations/portuguese.ts \
$$PWD/translations/romanian.ts \
$$PWD/translations/spanish.ts
internal.pro is this:
TEMPLATE = lib
TARGET = internal
CONFIG += c++1z
QT += core core-private gui quick serialport sql multimedia
DEFINES += CURRENT_PATH=\\\"$$PWD\\\"
CONFIG(release, debug|release) {
CONFIG += qtquickcompiler
QMAKE_CXXFLAGS += -O3
}
CONFIG(debug, debug|release) {
QMAKE_CXXFLAGS += -O0
QMAKE_CXXFLAGS -= -O1
QMAKE_CXXFLAGS -= -O2
QMAKE_CXXFLAGS -= -O3
QMAKE_CXXFLAGS += --debug
}
#MS_SKELETON_MODULES = core utils network
#include($$PWD/../external/ms-skeleton/ms-skeleton.pri)
include($$PWD/aggiornamento/aggiornamento.pri)
include($$PWD/allarmi/allarmi.pri)
include($$PWD/comunicazione/comunicazione.pri)
include($$PWD/core/core.pri)
include($$PWD/jsoncpp/jsoncpp.pri)
include($$PWD/mqtt/mqtt.pri)
include($$PWD/other/other.pri)
include($$PWD/parametri/parametri.pri)
include($$PWD/programs/programs.pri)
include($$PWD/serializer/serializer.pri)
unix: target.path = /opt/Tagliavini/lib
!isEmpty(target.path): INSTALLS += target
and app.pro is this :
TEMPLATE = app
TARGET = UserInterface
CONFIG += c++1z
QT += core gui quick sql multimedia
DEFINES += CURRENT_PATH=\\\"$$PWD\\\"
CONFIG(release, debug|release) {
CONFIG += qtquickcompiler
QMAKE_CXXFLAGS += -O3
}
CONFIG(debug, debug|release) {
QMAKE_CXXFLAGS += -O0
QMAKE_CXXFLAGS -= -O1
QMAKE_CXXFLAGS -= -O2
QMAKE_CXXFLAGS -= -O3
QMAKE_CXXFLAGS += --debug
}
LIBS += -L$$shadowed($$PWD)/../internal/ -linternal
INCLUDEPATH += \
$$PWD/../internal \
$$PWD/../external/ms-skeleton
SOURCES += $$PWD/main.cpp
RESOURCES += \
$$PWD/../../font/fonts.qrc \
$$PWD/../../images/images.qrc \
$$PWD/qml/qml.qrc \
$$PWD/../../sounds/sounds.qrc
unix: target.path = /opt/Tagliavini/bin
!isEmpty(target.path): INSTALLS += target
when i try to create file .ts with lupdate , the files are generated correctly , but the file .ts not cointeins the qstr strings that are into qml files. ( the file qml are into app.pro ), instead the string that i want to translate into .cpp files are all recognized correctly and put into .ts file.(these are into internal.pro) Where is the problem??
It seems that you are including your .qml files in .qrc resources but not in the project SOURCES itself. lupdate will not pick/parse your .qrc files to list .qml files.
So, you will have to add your .qml files to SOURCES either one-by-one or per directory.
lupdate_only{
SOURCES+=example.qml
SOURCES+=app/FancyControls/*.qml
}
This will duplicate your QML file entries in Qt Creator project pane tree which is not very desirable. So, you can comment out those lines in your .pro file and uncomment it before any lupdate. It's also mandatory to fence those imports in lupdate_only{} conditional statement. Make sure that there is no space between lupdate_only and the curly bracket. Actually, your C/C++ compiler would not expect a qml file to be compiled.

How do I include muparser library in my Qt project?

I made a muparser.pri which had the following content,
macx|win32|equals(build_muparser, "true")|!packagesExist(muparser){
message("Using bundled muparser")
MUPARSER_DIR = src/rel/muparser
DEPENDPATH += $$MUPARSER_DIR/include \
$$MUPARSER_DIR/src
INCLUDEPATH += $$MUPARSER_DIR/include
GEN_LIB_DIR = ../../generated/lib
LIBS += -L$$GEN_LIB_DIR -lmuparser
PRE_TARGETDEPS += $$GEN_LIB_DIR/libmuparser.a
}else{
message("Using external muparser")
CONFIG += link_pkgconfig
PKGCONFIG += muparser
}
I, then, added a
include(./muparser.pri)
in my application's make file.
This gave me an error
":-1: error: No rule to make target '../../generated/lib/libmuparser.a', needed by 'debug/Akaar1.exe'. Stop."
What did I do wrong? How else am I supposed to include this library in my project?
In your .pro file you can do:
LIBS += -L*path to the library* -l*library name: foo for libfoo.a*

Qt support for HockeySDK

Is there a way to use the HockeySDK within a Qt application? I made a basic test trying to import your framework into my project adding these lines to my profile:
# test.pro
LIBS += -F/Applications/HockeyApp.app/Contents/Frameworks -framework HockeySDK
OBJECTIVE_SOURCES += hockey.m
With the following code:
// hockey.m
#include <HockeySDK/HockeySDK.h>
void hockey() {
[[BITHockeyManager sharedHockeyManager] configureWithIdentifier:#"APP_IDENTIFIER"];
// Do some additional configuration if needed here
[[BITHockeyManager sharedHockeyManager] startManager];
}
But I have the following error:
error: 'HockeySDK/HockeySDK.h' file not found
Any help?
I fixed my problem using the following pro file:
# test.pro
QMAKE_CXXFLAGS += -F/path/to/the/folder/containing/frameworks
QMAKE_OBJECTIVE_CFLAGS += -F/path/to/the/folder/containing/frameworks
LIBS += -F/path/to/the/folder/containing/frameworks
LIBS += -framework HockeySDK
LIBS += -framework Foundation
OBJECTIVE_SOURCES += hockey.m

App crashes at start when using OpenCV 2.3.1 in Qt 4.8.0

I tried to control my camera using OpenCV functions. The building progress is fine, however, when I tried to run my program it crashes and Qt only gives the information about the exit code -1073741515. I tried to comment all of the code using OpenCV function and the program seems to be OK. Are the libraries I included the wrong ones?
opencv.pro
QT += core gui
TARGET = opencv
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
INCLUDEPATH += F:/opencv/build/include
INCLUDEPATH += F:/opencv/build/include/opencv
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_calib3d231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_contrib231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_core231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_features2d231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_flann231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_gpu231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_highgui231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_imgproc231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_legacy231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_ml231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_objdetect231.dll.a
LIBS += F:/opencv/build/x86/mingw/lib/libopencv_video231.dll.a
mainwindow.cpp
Since MainWindow.cpp is long, I will just paste the constructor here and add the rest of them if needed.
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
cam = NULL;
frame = NULL;
timer = new QTimer;
imag = new QImage();
connect(timer,SIGNAL(timeout()),this,SLOT(readFrame()));
connect(ui->open,SIGNAL(clicked()),this,SLOT(openCamara()));
connect(ui->pic,SIGNAL(clicked()),this,SLOT(takingPictures()));
connect(ui->closeCam,SIGNAL(clicked()),this,SLOT(closeCamara()));
}
Finally GET IT WORK! When I try to run the app from Windows Explorer, it complains about lack of libstdc++-6.dll. Although there exist on under C:\QtSDK\mingw\bin, its version is incorrect for OpenCV 2.3 (or any other reason?) and will cause an error. I got one from here and the program runs correctly.

Resources