I'm testing a Cute report writer, working with QT. My problem is that when i add the include directory to the .pro file i get the following error:
11:50:41: Running steps for project ReportTest...
11:50:41: Starting: "C:\Qt\5.9.1\mingw53_32\bin\qmake.exe" C:\Users\dkolb\Documents\Develop\test\ReportTest\ReportTest.pro -spec win32-g++
Info: creating stash file C:\Users\dkolb\Documents\Develop\test\build-ReportTest-Desktop_Qt_5_9_1_MinGW_32bit-Release\.qmake.stash
11:50:44: The process "C:\Qt\5.9.1\mingw53_32\bin\qmake.exe" exited normally.
11:50:44: Starting: "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" qmake_all
mingw32-make: Nothing to be done for 'qmake_all'.
11:50:48: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
11:50:48: Starting: "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe"
C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory 'C:/Users/dkolb/Documents/Develop/test/build-ReportTest-Desktop_Qt_5_9_1_MinGW_32bit-Release'
'C:\Qt\5.9.1\mingw53_32\bin\uic.exe' ../ReportTest/mainwindow.ui -o ui_mainwindow.h
g++ -c -fno-keep-inline-dllexport -pipe -O2 -std=gnu++11 -Wextra -Wall -W -fexceptions -mthreads -DUNICODE -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I../ReportTest -I. -I"C:/Program Files (x86)/ExaroLogic/CuteReport/development/include/cutereport" -IC:/Qt/5.9.1/mingw53_32/include -IC:/Qt/5.9.1/mingw53_32/include/QtWidgets -IC:/Qt/5.9.1/mingw53_32/include/QtGui -IC:/Qt/5.9.1/mingw53_32/include/QtANGLE -IC:/Qt/5.9.1/mingw53_32/include/QtCore -Irelease -I. -IC:/Qt/5.9.1/mingw53_32/mkspecs/win32-g++ -o release/main.o ../ReportTest/main.cpp
Makefile.Release:346: recipe for target 'release/main.o' failed
mingw32-make[1]: Leaving directory 'C:/Users/dkolb/Documents/Develop/test/build-ReportTest-Desktop_Qt_5_9_1_MinGW_32bit-Release'
Makefile:36: recipe for target 'release' failed
mingw32-make[1]: *** [release/main.o] Error -1073741502
mingw32-make: *** [release] Error 2
11:50:58: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project ReportTest (kit: Desktop Qt 5.9.1 MinGW 32bit)
When executing step "Make"
11:50:58: Elapsed time: 00:17.
For testing I'm using an empty gui application.It does compile when i take the include out.
I have download the 32bit version of the report writer as i'm compiling on 32bits, but i don't think that QT is even near the dlls. Here is the .pro file:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = ReportTest
TEMPLATE = app
INCLUDEPATH += "C:/Program Files (x86)/ExaroLogic/CuteReport/development/include/cutereport"
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
mainwindow.cpp
HEADERS += \
mainwindow.h
FORMS += \
mainwindow.ui
Related
I run
make
I get this error
mkdir -p build/
mpicc -Wall -fPIC -m64 -O3 -c src/main.c -o build/main.o
make: mpicc: No such file or directory
make: *** [Makefile:24: build/main.o] Error 127
while trying to compile an mpi project. This is for a project for school and we are "required" to download the libopenmpi-dev package for ubuntu. I'm on fedora so I've tried installing openmpi, mpich-devel, lib-openmpi-devel,libmpich but nothing works yet. I still get the same error. I'm not sure where to go from here.I thought it could just be an export error for mpicc but locate mpicc and whereis mpicc returns nothing.
I have tried this on multiple platforms, experiencing the same issue every time.
I successfully build and run my C++ OpenFrameworks application using QtCreator - no problems are encountered.
Then, I successfully use qmake to generate the project file.
Yet when I attempt to make the executable, I receive the following error:
make
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++1z -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12 -Wall -Wextra -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I/opt/homebrew/lib/QtGui.framework/Headers -I/opt/homebrew/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/AGL.framework/Headers -I/opt/homebrew/share/qt/mkspecs/macx-clang -F/opt/homebrew/lib -o main.o src/main.cpp
src/main.cpp:1:10: fatal error: 'ofMain.h' file not found
#include "ofMain.h"
^~~~~~~~~~
1 error generated.
make: *** [main.o] Error 1
I can go into the .pro file and add things to the include path manually, but I don't see why these includes aren't generated automatically?
I think I recognized your problem.
The file name is main.cpp in the src/ folder. Based on its location in the src/ folder, I think your ofMain.h file is also in the src/ folder. Now a question: did you add src/ to your include path? If not with the following line:
INCLUDEPATH += \
src/
It should work now I hope.
Have a nice day!
I downloaded arm-none-linux-gnueabi from CodeSourcery version 2011, after set path and config with this command
sudo ./configure \
-opengl es2 -no-xcb\
-release -silent \
-continue \
-opensource -confirm-license \
-prefix $DEVICE_PREFIX \
-hostprefix $HOST_PREFIX \
-sysroot $SYSTEM_ROOT \
-device $TARGET_DEVICE \
-device-option CROSS_COMPILE=${CC} \
-qt-libpng \
-qt-libjpeg \
-nomake examples \
-nomake tests
Get this Error :
executing config test use_gold_linker
+ cd /home/amin/EMA/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests && arm-none-linux-gnueabi-g++ -fuse-ld=gold -o conftest-out conftest.cpp
cc1plus: error: unrecognized command line option '-fuse-ld=gold'
test config.qtbase.tests.use_gold_linker FAILED
executing config test verifyspec
+ cd /home/amin/EMA/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/verifyspec && /home/amin/EMA/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qmake -qtconf /home/amin/EMA/qt-everywhere-opensource-src-5.8.0/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static console" "QMAKE_CFLAGS += --sysroot=/" "QMAKE_CXXFLAGS += --sysroot=/" "QMAKE_LFLAGS += --sysroot=/" /home/amin/EMA/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/verifyspec
+ cd /home/amin/EMA/qt-everywhere-opensource-src-5.8.0/qtbase/config.tests/common/verifyspec && MAKEFLAGS= /usr/bin/make
arm-none-linux-gnueabi-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb -mfloat-abi=softfp --sysroot=/ -O2 -O3 -Wall -W -fPIC -I. -I/home/amin/EMA/qt-everywhere-opensource-src-5.8.0/qtbase/mkspecs/devices/linux-beagleboard-g++ -o verifyspec.o verifyspec.cpp
arm-none-linux-gnueabi-g++ -mfloat-abi=softfp --sysroot=/ -Wl,-O1 -o verifyspec verifyspec.o -lrt -lpthread -ldl
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lrt
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lpthread
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -ldl
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lstdc++
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lm
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lc
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
/home/amin/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status
Makefile:64: recipe for target 'verifyspec' failed
make: *** [verifyspec] Error 1
Your compilation log shows that it was trying to use the gold linker, however the command was not found. The later error of missing libraries and object files presumably stem from this error.
gold is a relatively recent addition to the GNU toolchain, and you're using a fairly old version (gcc 4.6.1) so I would suggest upgrading your toolchain to the most recent one, unless you have really good reasons not to do so.
Qt is quite opinionated when it comes to toolchain selection. There's a list of supported compilers which does not include something based on GCC 4.6. Given that Qt requires C++11 support these days, your chances of getting this working with an ancient compiler are severely limited.
Linaro provides nice toolchains for download. Is there any reason why you are not using one? Alternatively, you also likely require some additional SW on your BBB, so chances are that you're using a distribution like Debian or a building tool such as Buildroot or Yocto for producing your images. BeagleBone Black is a mainstream platform with support provided by essentially anything targetting embedded platforms.
A TL;DR version: Update your toolchain or your build environment. Qt is no simple library.
I am trying to run a simple console application (Hello World program) on Qt 5.6.0. Here is the code:
#include <QCoreApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
qDebug() << "Hello World";
return a.exec();
}
But it's generating error. ([main.o]error 2).
11:37:44: Running steps for project test... 11:37:44: Configuration
unchanged, skipping qmake step. 11:37:44: Starting: "/usr/bin/make"
/Applications/Xcode
7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-c -pipe -stdlib=libc++ -g -std=gnu++11 -isysroot /Applications/Xcode 7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
-mFile Doesn't Exist, Will Create: /Applications/Xcode Invalid Arguments -version-min=10.7 -Wall -W -fPIC -DQT_QML_DEBUG
-DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../test -I. -I../Qt5.6.0/5.6/clang_64/lib/QtWidgets.framework/Headers -I../Qt5.6.0/5.6/clang_64/lib/QtGui.framework/Headers -I../Qt5.6.0/5.6/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode -I7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers
-I/Applications/Xcode -I7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AGL.framework/Headers/
-I. -I../Qt5.6.0/5.6/clang_64/mkspecs/macx-clang -F/Users/macwaves/Qt5.6.0/5.6/clang_64/lib -o main.o ../test/main.cpp /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file make: ***
[main.o] Error 2 11:37:44: The process "/usr/bin/make" exited with
code 2. Error while building/deploying project test (kit: Desktop Qt
5.6.0 clang 64bit) When executing step "Make" 11:37:44: Elapsed time: 00:00.
I tried to set PATH (/Users/macwaves/Qt5.6.0/5.6/clang_64/bin). Renamed my Xcode 7.app to Xcode7.app but, problem still persists.
Can anybody help?
Here is a snapshot of my problem :
I have just uninstall(5.6.0) and reinstalled the older version (5.5.1) on my mac os x. It works smoothly. :)
I built a Qt project in Debug mode with Qt Creator, ran Callgrind to generate profiling data and tried loading it into Cachegrind. I noticed that I only see profiling information for Qt classes, so I figured I must have forgotten to turn on a crucial flag.
Qt Creator's qmake command looks like this:
qmake /path/to/project/MyProject/MyProject.pro -r -spec linux-g++-64 CONFIG+=debug
Sample compile output for one file:
g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I../Flowchart -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I../Flowchart -I. -o main.o ../Flowchart/main.cpp
The -g flag is there, so debug information should be available. I verified this by running gdb on the executable and trying to look at some random source code with l.
The Callgrind command I used was:
valgrind --tool=callgrind ./MyProject
What am I missing here?
You should do:
valgrind --tool=callgrind --trace-children=yes --demangle=yes ./MyProject
Also depending on the distribution of Linux you may have to make sure that you have the Debug information in the QT libraries you are linking against.