OS: Windows 10
Hello, really hope someone can help as i am desperately trying to install the QMYSQL driver. I am aware that there have been tons of posts about this, but my issue is still not resolved and i really don't know why... My mysql.h file certainly does exist, and thus its path is provided for include. I have latest versions of Qt (5.8 with sources) and MySql (5.7). In mysql installation I chose developer default and installation was successful. I will be happy to provide any further information. I ask for anyone that can help please. Thank you.
in cmd from:
C:\Qt\5.8\Src\qtbase\src\plugins\sqldrivers\mysql
i run:
qmake "INCLUDEPATH+=C:\Program Files\MySQL\MySQL Server 5.7\include" "LIBS+=C:\Program Files\MySQL\MySQL Server 5.7\lib" mysql.pro
then mingw32-make as normal.
i get:
mingw32-make -f Makefile.Release all
mingw32-make[1]: Entering directory 'C:/Qt/5.8/Src/qtbase/src/plugins /sqldrivers/mysql'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++1z -fno-exceptions -frtti -Wall -Wextra
-Wvla -Wdate-time -DUNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS
-DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -IC:\Program -IFiles\MySQL\MySQL
-IServer -I5.7\include -IC:\Qt\5.8\mingw53_32\include\QtSql\5.8.0 -IC:\Qt\5.8\mingw53_32
\include\QtSql\5.8.0\QtSql -IC:\Qt\5.8\mingw53_32\include\QtCore\5.8.0 -IC:\Qt\5.8\mingw53_32\include\
QtCore\5.8.0\QtCore -IC:\Qt\5.8\mingw53_32\include -IC:\Qt\5.8\mingw53_32\include\QtSql -IC:\Qt\5.8\
mingw53_32\include\QtCore -I.moc\release -IC:\utils\my_sql\my_sql\include -IC:\utils\postgresql
\pgsql\include -IC:\openssl\include -I..\..\..\..\mkspecs\win32-g++ -o .obj\release\qsql_mysql.o qsql_mysql.cpp
In file included from qsql_mysql.cpp:40:0:qsql_mysql_p.h:60:19: fatal error: mysql.h: No such file or directory
compilation terminated.
Makefile.Release:355: recipe for
target '.obj/release/qsql_mysql.o' failed
mingw32-make[1]: *** [.obj/release/qsql_mysql.o] Error 1
mingw32-make[1]: Leaving directory
'C:/Qt/5.8/Src/qtbase/src/plugins /sqldrivers/mysql'
Makefile:38: recipe for target 'release-all' failed
mingw32-make: *** [release-all] Error 2
Related
I got into the book "Beginning STM32" - Warren Gay.
I tried to build the sources under Cygwin, but even if the path to the required files is denoted in the makefile, the required files were not found.The file in the folders libopencm3/cm3/scb.h lays in the path: /home/root/STM32/stm32f103c8t6/libopencm3/include so the correct path should be /home/root/STM32/stm32f103c8t6/libopencm3/include/libopencm3/cm3/scb.h and I checked the presence of the files.
So I tried to change the #include into #include "file.h" with the required header file in the source folder - this worked, but there are a lot of cases in different source files.
Is there any suggestion to get this fixed or to find a way to get out of this?
Thanks a lot!
This is what I got from the terminal.
[~/STM32/stm32f103c8t6]
$ make
make -C rtos/libwwg
make[1]: Entering directory '/home/root/STM32/stm32f103c8t6/rtos/libwwg'
make -w -C ./src
make[2]: Entering directory '/home/root/STM32/stm32f103c8t6/rtos/libwwg/src'
arm-none-eabi-gcc -Os -g -std=c99 -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd -Wextra -Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -fno-common -ffunction-sections -fdata-sections -I/home/root/STM32/stm32f103c8t6/libopencm3/include -I/home/root/STM32/stm32f103c8t6//rtos/libwwg/include -I./rtos -I. -MD -Wall -Wundef -DSTM32F1 -I/home/root/STM32/stm32f103c8t6/libopencm3/include -I/home/root/STM32/stm32f103c8t6//rtos/libwwg/include -o usbcdc.o -c usbcdc.c
usbcdc.c:7:10: fatal error: libopencm3/cm3/scb.h: No such file or directory
7 | #include <libopencm3/cm3/scb.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [../../../Makefile.incl:111: usbcdc.o] Error 1
make[2]: Leaving directory '/home/root/STM32/stm32f103c8t6/rtos/libwwg/src'
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/home/root/STM32/stm32f103c8t6/rtos/libwwg'
make: *** [Makefile:41: libwwg] Error 2
So, I know what is the source of the problem.
There are problems in Cygwin with the path format or rather between the interaction between the Windows and Linux path formats. I could solve the problem by changing the paths in the Makefile from the Linux /home/folder to the Windows D:\home\folder\ format.
more detailed answer beginners:
modifying 2 lines at "Makefile.incl" may solve the problem.
"Makefile.incl" is suppose to be in ~/STM32/stm32f103c8t6 folder in above case.
Following are the lines in "Makefile.incl"
#TOP_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
TOP_DIR := C:\xyz\home\STM32\stm32f103c8t6
#OPENCM3_DIR := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/libopencm3)
OPENCM3_DIR := c:/xyz/home/STM32/stm32f103c8t6/libopencm3
'\' or '/' in path doesn't matter
We have software that we distributed to a bunch of Pis that have Raspian Wheezy. Recently, we've added in a bit of code that uses C++ standards that aren't integrated until >=gcc-4.8. If I compile on a newer version of Raspian, there are glibc mismatch errors when running on the Wheezy installed Pis.
Can I get >=gcc-4.8 on one of the Wheezy Pis without also having to install a higher version of glibc (which automatically makes any binary compiled refuse to work on the other Pis)?
Side note:
I've been trying to compile gcc-4.8 but I'm having the worst time because it keeps throwing a bits/predefs.h is missing error. Even though I configured it with --disable-multilib:
make[3]: Entering directory '/root/gcc-4.8/gcc-4.8-20150611/armv7l-unknown-linux-gnueabihf/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/root/gcc-4.8/gcc-4.8-20150611/host-armv7l-unknown-linux-gnueabihf/gcc/xgcc -B/root/gcc-4.8/gcc-4.8-20150611/host-armv7l-unknown-linux-gnueabihf/gcc/ -B/usr/local/armv7l-unknown-linux-gnueabihf/bin/ -B/usr/local/armv7l-unknown-linux-gnueabihf/lib/ -isystem /usr/local/armv7l-unknown-linux-gnueabihf/include -isystem /usr/local/armv7l-unknown-linux-gnueabihf/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -fno-inline -I. -I. -I../../host-armv7l-unknown-linux-gnueabihf/gcc -I../.././libgcc -I../.././libgcc/. -I../.././libgcc/../gcc -I../.././libgcc/../include -DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../.././libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/stdio.h:28:0,
from ../.././libgcc/../gcc/tsystem.h:87,
from ../.././libgcc/libgcc2.c:27:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
#include <bits/predefs.h>
^
compilation terminated.
Makefile:460: recipe for target '_muldi3.o' failed
make[3]: *** [_muldi3.o] Error 1
make[3]: Leaving directory '/root/gcc-4.8/gcc-4.8-20150611/armv7l-unknown-linux-gnueabihf/libgcc'
Makefile:14787: recipe for target 'all-stage1-target-libgcc' failed
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/root/gcc-4.8/gcc-4.8-20150611'
Makefile:18655: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/root/gcc-4.8/gcc-4.8-20150611'
Makefile:884: recipe for target 'all' failed
make: *** [all] Error 2
This article (https://superuser.com/questions/762274/error-compiling-gcc-on-raspberry-pi) doesn't fix my issue unfortunately.
I am using QT 4.6.2 with MinGW 4.4. I have used
qmake –project
qmake example.pro
They are successfully executed. But While using make command from QT command prompt, giving me the following error,
C:\Users\musharrat.khan\Desktop\example>make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Users/musharrat.khan/Desktop/example'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..
\..\..\Qt\4.6.2\include\QtCore" -I"..\..\..\..\Qt\4.6.2\include\QtGui" -I"..\..\..\..\Qt\4.6.2\include" -I"." -I"..\..\..\..\Qt\4.6.2\include\ActiveQt" -I"debug
" -I"..\..\..\..\Qt\4.6.2\mkspecs\win32-g++" -o debug\example.o example.cc
process_begin: CreateProcess(C:\Users\MUSHAR~1.KHA\AppData\Local\Temp\make4484-1.bat, C:\Users\MUSHAR~1.KHA\AppData\Local\Temp\make4484-1.bat, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[1]: *** [debug/example.o] Error 2
mingw32-make[1]: Leaving directory `C:/Users/musharrat.khan/Desktop/example'
mingw32-make: *** [debug] Error 2
Are there any solution for this? I am using windows 8.1.
I'm trying to compile PhantomJS 2, which uses Qt5. I am running into this failure:
make[2]: Entering directory `/app/phantomjs/src/qt/qtbase/src/platformsupport'
g++ -c -include .pch/Qt5PlatformSupport -pipe -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_GRAPHICSVIEW -DQT_NO_GRAPHICSEFFECT -DQT_NO_STYLESHEET -DQT_NO_STYLE_CDE -DQT_NO_STYLE_CLEANLOOKS -DQT_NO_STYLE_MOTIF -DQT_NO_STYLE_PLASTIQUE -DQT_NO_CAST_FROM_ASCII -DQT_NO_FONTCONFIG -DQT_BUILD_PLATFORMSUPPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I../../mkspecs/linux-g++ -I. -I../../include -I../../include/QtPlatformSupport -I../../include/QtPlatformSupport/5.3.0 -I../../include/QtPlatformSupport/5.3.0/QtPlatformSupport -I../../include/QtGui/5.3.0 -I../../include/QtGui/5.3.0/QtGui -I../../include/QtGui -I../../include/QtCore/5.3.0 -I../../include/QtCore/5.3.0/QtCore -I../../include/QtCore -I.moc -o .obj/qbasicfontdatabase.o fontdatabases/basic/qbasicfontdatabase.cpp
In file included from ../../include/QtGui/5.3.0/QtGui/private/../../../../../src/gui/text/qfontengine_ft_p.h:58:0,
from ../../include/QtGui/5.3.0/QtGui/private/qfontengine_ft_p.h:1,
from fontdatabases/basic/qbasicfontdatabase.cpp:54:
/usr/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory
#include <freetype/config/ftheader.h>
^
compilation terminated.
make[2]: *** [.obj/qbasicfontdatabase.o] Error 1
make[2]: Leaving directory `/app/phantomjs/src/qt/qtbase/src/platformsupport'
make[1]: *** [sub-platformsupport-make_first] Error 2
make[1]: Leaving directory `/app/phantomjs/src/qt/qtbase/src'
make: *** [sub-src-make_first] Error 2
I've installed freetype2:
$ find / -name ftheader.h
/usr/include/freetype2/freetype/config/ftheader.h
/app/phantomjs/src/qt/qtbase/src/3rdparty/freetype/include/freetype/config/ftheader.h
Not sure how to resolve this, since I don't have much experience with C/C++ building. I might have to add/change a prefix, but I'm not sure how.
If you look at the locations of the error (), there is the following comment right above it:
55 /* `<prefix>/include/freetype2' must be in your current inclusion path */
56 #include <freetype/config/ftheader.h>
Not sure why the build didn't resolve this on its own, since it's resolved other libraries it depends on, but adding -I /usr/include/freetype2 to the build configuration did the trick.
For the case of PhantomJS specifically, the full command was:
./build.sh --confirm --qt-config '-I /usr/include/freetype2'
I want to try using QML ShaderEffectItem on QGraphicsView
I have cloned files from https://qt.gitorious.org/qt-labs/qml1-shadersplugin how is written in post, and i have compiled this plugin in ~/Dev/GitRepo/qml1-shadersplugin$:
using QtCreator, compiles this file: qmlshadersplugin.pro
But now i run in this folder(~/Dev/GitRepo/qml1-shadersplugin): make install
And i have many: errors:
~/Dev/GitRepo/qml1-shadersplugin$ make installcd src/ && make -f Makefile install
make[1]: Entering directory `/home/goran/Dev/GitRepo/qml1-shadersplugin/src'
g++ -c -m32 -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_DECLARATIVE_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/linux-g++-32 -I. -I../../../../QtSDK/Desktop/Qt/474/gcc/include/QtCore -I../../../../QtSDK/Desktop/Qt/474/gcc/include/QtGui -I../../../../QtSDK/Desktop/Qt/474/gcc/include/QtOpenGL -I../../../../QtSDK/Desktop/Qt/474/gcc/include/QtDeclarative -I../../../../QtSDK/Desktop/Qt/474/gcc/include -I/usr/X11R6/include -I. -o qmlshadersplugin_plugin.o qmlshadersplugin_plugin.cpp
In file included from ../../../../QtSDK/Desktop/Qt/474/gcc/include/QtOpenGL/QtOpenGL:5:0,
from shadereffectitem.h:46,
from qmlshadersplugin_plugin.cpp:43:
../../../../QtSDK/Desktop/Qt/474/gcc/include/QtOpenGL/qgl.h:77:20: fatal error: GL/gl.h: No such file or directory
compilation terminated.
make[1]: *** [qmlshadersplugin_plugin.o] Error 1
make[1]: Leaving directory `/home/igor/Dev/GitRepo/qml1-shadersplugin/src'
make: *** [sub-src-install_subtargets] Error 2
What's the problem ?
GL/gl.h: No such file or directory
This means that you either do not have opengl library installed (very unlikely), or you didn't enabled it in your qmake file (very likely). To enable opengl in the qmake file, you need to add this line :
QT += opengl
More about it here.