I want to run GDCM lib (v.3.0.0) using C ++ in the API QT 5.13.1 (MinGW 7.3.0 64-bit) to read DICOM files. This is normal when I include the header files and see all the methods in the libraries. But here
ascending error when I try to run:
undefined reference to '_imp__ZN4gdcm11ImageReaderC1Ev'
Here is what i'am already tried:
include all GDCM libs
downgrade gpp
dcm_reader.pro file
...
INLCUDEPATH += -L'C:\Program Files (x86)\GDCM 3.0\include\gdcm-3.0'
LIBS += -L'C:\Program Files (x86)\GDCM 3.0\bin'
LIBS += -L'C:\Program Files (x86)\GDCM 3.0\lib'
LIBS += -lgdcmcharls -lgdcmCommon -lgdcmDICT -lgdcmDSED -lgdcmexpat -lgdcmIOD -lgdcmjpeg8 -lgdcmjpeg12 -lgdcmjpeg16 -lgdcmMEXD -lgdcmMSFF -lgdcmuuid -lgdcmzlib -lsocketxx
#LIBS += -lgdcmImageReader // Raised error "cannot find -lgdcmImageReader"
main.cpp
incude <gdcmImageReader.h>
int main()
{
gdcm::ImageReader reader; // Error: undefined reference to '_imp__ZN4gdcm11ImageReaderC1Ev'
}
I have suspicions that this error is due to the fact that I do not to have the full version of the libs or that the GDCM librs is not suitable for the QT compliants.
Compile output:
18:15:25: Запускаются этапы для проекта dcm_reader... 18:15:25: Запускается: "C:\Qt\Qt5.13.1\Tools\mingw730_32\bin\mingw32-make.exe" clean -j4 C:/Qt/Qt5.13.1/Tools/mingw730_32/bin/mingw32-make -f Makefile.Debug clean C:/Qt/Qt5.13.1/Tools/mingw730_32/bin/mingw32-make
-f Makefile.Release clean mingw32-make[1]: Entering directory 'C:/Users/user/Documents/build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug' del debug\moc_predefs.h mingw32-make[1]: Entering directory 'C:/Users/user/Documents/build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug' del release\moc_predefs.h Н• г§ •вбп ≠ ©в® C:\Users\user\Documents\build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug\debug\moc_predefs.h Н• г§ •вбп ≠ ©в® C:\Users\user\Documents\build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug\release\moc_predefs.h del debug\main.o del release\main.o Н• г§ •вбп ≠ ©в® C:\Users\user\Documents\build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug\release\main.o mingw32-make[1]: Leaving directory 'C:/Users/user/Documents/build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug' mingw32-make[1]: Leaving directory 'C:/Users/user/Documents/build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug' 18:15:27: ѕроцесс ЂC:\Qt\Qt5.13.1\Tools\mingw730_32\bin\mingw32-make.exeї завершился успешно. 18:15:27: «апускаетс€: ЂC:\Qt\Qt5.13.1\5.13.1\mingw73_32\bin\qmake.exeї C:\Users\user\Documents\dcm_reader\dcm_reader.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" 18:15:28: ѕроцесс ЂC:\Qt\Qt5.13.1\5.13.1\mingw73_32\bin\qmake.exeї завершился успешно. 18:15:28: «апускаетс€: ЂC:\Qt\Qt5.13.1\Tools\mingw730_32\bin\mingw32-make.exeї -f C:/Users/user/Documents/build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug/Makefile qmake_all mingw32-make: Nothing to be done for 'qmake_all'. 18:15:28: ѕроцесс ЂC:\Qt\Qt5.13.1\Tools\mingw730_32\bin\mingw32-make.exeї завершился успешно. 18:15:28: Запускается: "C:\Qt\Qt5.13.1\Tools\mingw730_32\bin\mingw32-make.exe" -j4 C:/Qt/Qt5.13.1/Tools/mingw730_32/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory 'C:/Users/user/Documents/build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug' g++ -c -fno-keep-inline-dllexport -g -std=gnu++11 -Wall -W -Wextra
-fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I..\dcm_reader -I. -I..\..\..\..\Qt\libs\GDCM_3.0\include\gdcm-3.0 -I..\..\..\..\Qt\Qt5.13.1\5.13.1\mingw73_32\include -I..\..\..\..\Qt\Qt5.13.1\5.13.1\mingw73_32\include\QtCore -Idebug -I..\..\..\..\Qt\Qt5.13.1\5.13.1\mingw73_32\mkspecs\win32-g++ -o debug\main.o ..\dcm_reader\main.cpp g++ -Wl,-subsystem,console
-mthreads -o debug\dcm_reader.exe debug/main.o -LC:\Qt\libs\GDCM_3.0\bin -LC:\Qt\libs\GDCM_3.0\lib -lgdcmcharls -lgdcmCommon -lgdcmDICT -lgdcmDSED -lgdcmexpat -lgdcmgetopt -lgdcmIOD -lgdcmjpeg8 -lgdcmjpeg12 -lgdcmjpeg16 -lgdcmmd5 -lgdcmMEXD -lgdcmMSFF -lgdcmzlib C:\Qt\Qt5.13.1\5.13.1\mingw73_32\lib\libQt5Cored.a debug/main.o: In function `main': C:\Users\user\Documents\build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug/../dcm_reader/main.cpp:5: undefined reference to `_imp___ZN4gdcm11ImageReaderC1Ev' C:\Users\user\Documents\build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug/../dcm_reader/main.cpp:5: undefined reference to `_imp___ZN4gdcm11ImageReaderD1Ev' collect2.exe: error: ld returned 1 exit status mingw32-make[1]: *** [Makefile.Debug:65: debug/dcm_reader.exe] Error 1 mingw32-make: *** [Makefile:38: debug] Error 2 mingw32-make[1]: Leaving directory 'C:/Users/user/Documents/build-dcm_reader-Desktop_Qt_5_13_1_MinGW_32_bit-Debug' 18:15:31: ѕроцесс ЂC:\Qt\Qt5.13.1\Tools\mingw730_32\bin\mingw32-make.exeї завершился с кодом 2. Ошибка при сборке/разворачивании проекта dcm_reader (комплект: Desktop Qt 5.13.1 MinGW 32-bit) Во время выполнения этапа "Сборка" 18:15:31: ѕрошло времени: 00:05.
Related
I am trying to install pHash library on ubuntu, i installed libfftw3 and all the required libraries. Everything is Ok when I run ./configure command, but when i try to run the 'make' command this error always appear : undefined reference to `fftw_init_threads'.
make command :
g551683#sst-p1310007fl:~/Documents/pHash-0.2.9.6$ make
make all-recursive
make[1]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6'
Making all in src
make[2]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6/src'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6/src'
Making all in bindings
make[2]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6/bindings'
make[3]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6/bindings'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6/bindings'
make[2]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6/bindings'
Making all in examples
make[2]: Entering directory '/home/g551683/Documents/pHash-0.2.9.6/examples'
/bin/sh ../libtool --tag=CXX --mode=link g++ -O2 -ffast-math -O3 -L/usr/local/lib -lssl -lcrypto -o test_texthash test_texthash.o ../src/libpHash.la -lmpg123 -lsamplerate -lsndfile -lswscale -lavformat -lavutil -lavcodec -lpng -ljpeg -lfftw3
libtool: link: g++ -O2 -ffast-math -O3 -o .libs/test_texthash test_texthash.o -L/usr/local/lib ../src/.libs/libpHash.so -lssl -lcrypto /usr/local/lib/libmpg123.so /usr/lib/x86_64-linux-gnu/libltdl.so -ldl /usr/local/lib/libsamplerate.so -lsndfile -lswscale -lavformat -lavutil -lavcodec /usr/local/lib/libpng16.so -lz /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/local/lib/libfftw3.a -lm
test_texthash.o: In function `_GLOBAL__sub_I_main':
test_texthash.cpp:(.text.startup+0x1b1): undefined reference to `fftw_init_threads'
collect2: error: ld returned 1 exit status
Makefile:323: recipe for target 'test_texthash' failed
make[2]: *** [test_texthash] Error 1
make[2]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6/examples'
Makefile:419: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/g551683/Documents/pHash-0.2.9.6'
Makefile:298: recipe for target 'all' failed
make: *** [all] Error 2
Can someone help me to solve this error!
From the documentation:
First, programs using the parallel complex transforms should be linked with -lfftw3_threads -lfftw3 -lm on Unix, or -lfftw3_omp -lfftw3 -lm if you compiled with OpenMP. You will also need to link with whatever library is responsible for threads on your system (e.g. -lpthread on GNU/Linux) or include whatever compiler flag enables OpenMP (e.g. -fopenmp with gcc).
You are not linking against this fftw3_threads library, nor to the pthread library.
I am trying to build from scratch Mince on Ubuntu 14.04 x64 using an IDE(either Qtcreator or Codeblocks) because I want to debug the source, to understand how it works better.
Repository: https://github.com/Kingsford-Group/mince/
EDIT: since I found a workaround to build the project externally using -pthread I wonder if editing the file invoked by the make command would allow me to build from one of the IDE and debug the code.
I use cmake-gui with
BOOST_THREAD_LIBRARY: /usr/lib/x86_64-linux-gnu/libpthread.a
CMAKE_BUILD_TYPE:
CMAKE_INSTALL_PREFIX: /home/federico/bioinfo/Mince
and get this:
Boost version: 1.54.0
Found the following Boost libraries:
iostreams
filesystem
system
thread
timer
program_options
serialization
BOOST INCLUDE DIR = /usr/include
BOOST INCLUDE DIRS = /usr/include
BOOST LIB DIR = /usr/lib/x86_64-linux-gnu
BOOST LIBRAREIS = /usr/lib/x86_64-linux-gnu/libboost_iostreams.a;/usr/lib/x86_64-linux-gnu/libboost_filesystem.a;/usr/lib/x86_64-linux-gnu/libboost_system.a;/usr/lib/x86_64-linux-gnu/libboost_thread.a;/usr/lib/x86_64-linux-gnu/libboost_timer.a;/usr/lib/x86_64-linux-gnu/libboost_program_options.a;/usr/lib/x86_64-linux-gnu/libboost_serialization.a;/usr/lib/x86_64-linux-gnu/libpthread.a
Build system will fetch and build the Cereal serialization library
==================================================================
Build system will fetch and build Jellyfish
==================================================================
Found Intel TBB
TBB_LIBRARIES = /usr/lib/libtbb.so;/usr/lib/libtbbmalloc.so
CPACK_SOURCE_IGNORE_FILES = /build/;/bin/;/lib/;/external/;/src/obsolete/;/include/obsolete/;.git/
TBB_LIBRARIES = /usr/lib/libtbb.so;/usr/lib/libtbbmalloc.so
Boost_LIBRARIES = /usr/lib/x86_64-linux-gnu/libboost_iostreams.a;/usr/lib/x86_64-linux-gnu/libboost_filesystem.a;/usr/lib/x86_64-linux-gnu/libboost_system.a;/usr/lib/x86_64-linux-gnu/libboost_thread.a;/usr/lib/x86_64-linux-gnu/libboost_timer.a;/usr/lib/x86_64-linux-gnu/libboost_program_options.a;/usr/lib/x86_64-linux-gnu/libboost_serialization.a;/usr/lib/x86_64-linux-gnu/libpthread.a
Configuring done
Generating done
Then I use # make and get:
...
...
...
...
[ 67%] Built target minceutils
make -f src/CMakeFiles/canoncmp.dir/build.make src/CMakeFiles/canoncmp.dir/depend
make[2]: ingresso nella directory "/home/federico/bioinfo/Mince/build"
cd /home/federico/bioinfo/Mince/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/federico/bioinfo/Mince /home/federico/bioinfo/Mince/src /home/federico/bioinfo/Mince/build /home/federico/bioinfo/Mince/build/src /home/federico/bioinfo/Mince/build/src/CMakeFiles/canoncmp.dir/DependInfo.cmake --color=
Scanning dependencies of target canoncmp
make[2]: uscita dalla directory "/home/federico/bioinfo/Mince/build"
make -f src/CMakeFiles/canoncmp.dir/build.make src/CMakeFiles/canoncmp.dir/build
make[2]: ingresso nella directory "/home/federico/bioinfo/Mince/build"
/usr/bin/cmake -E cmake_progress_report /home/federico/bioinfo/Mince/build/CMakeFiles 1
[ 71%] Building CXX object src/CMakeFiles/canoncmp.dir/CanonicalCompare.cpp.o
cd /home/federico/bioinfo/Mince/build/src && /usr/bin/c++ -DHAVE_LOGGER -funroll-loops -fPIC -O3 -DHAVE_ANSI_TERM -DHAVE_SSTREAM -DHAVE_CONFIG_H -Wall -std=c++11 -Wno-unused-local-typedefs -I/home/federico/bioinfo/Mince/include -I/home/federico/bioinfo/Mince/external -I/home/federico/bioinfo/Mince/external/cereal/include -I/home/federico/bioinfo/Mince/external/install/include -I/home/federico/bioinfo/Mince/external/install/include/jellyfish-2.1.3 -o CMakeFiles/canoncmp.dir/CanonicalCompare.cpp.o -c /home/federico/bioinfo/Mince/src/CanonicalCompare.cpp
In file included from /home/federico/bioinfo/Mince/include/MinceUtils.hpp:15:0,
from /home/federico/bioinfo/Mince/src/CanonicalCompare.cpp:20:
/home/federico/bioinfo/Mince/include/ReadLibrary.hpp: In copy constructor ‘ReadLibrary::ReadLibrary(const ReadLibrary&)’:
/home/federico/bioinfo/Mince/include/ReadLibrary.hpp:35:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < mc; ++i) { libTypeCounts_[i].store(rl.libTypeCounts_[i].load()); }
^
/home/federico/bioinfo/Mince/include/ReadLibrary.hpp: In constructor ‘ReadLibrary::ReadLibrary(ReadLibrary&&)’:
/home/federico/bioinfo/Mince/include/ReadLibrary.hpp:48:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < mc; ++i) { libTypeCounts_[i].store(rl.libTypeCounts_[i].load()); }
^
/home/federico/bioinfo/Mince/src/CanonicalCompare.cpp: In function ‘std::vector<std::basic_string<char> > parseReadFile(const string&)’:
/home/federico/bioinfo/Mince/src/CanonicalCompare.cpp:37:7: warning: variable ‘isFastq’ set but not used [-Wunused-but-set-variable]
bool isFastq{false};
^
/home/federico/bioinfo/Mince/src/CanonicalCompare.cpp: In function ‘int main(int, char**)’:
/home/federico/bioinfo/Mince/src/CanonicalCompare.cpp:74:13: warning: unused variable ‘nb_threads’ [-Wunused-variable]
const int nb_threads = 10;
^
/home/federico/bioinfo/Mince/src/CanonicalCompare.cpp:75:13: warning: unused variable ‘concurrent_file’ [-Wunused-variable]
const int concurrent_file = 1; // Number of files to read simultaneously
^
/home/federico/bioinfo/Mince/src/CanonicalCompare.cpp:76:13: warning: unused variable ‘max_read_group’ [-Wunused-variable]
const int max_read_group = 100; // Number of reads in each "job" group
^
/home/federico/bioinfo/Mince/src/CanonicalCompare.cpp:82:12: warning: unused variable ‘bucketStringLength’ [-Wunused-variable]
uint32_t bucketStringLength;
^
Linking CXX executable canoncmp
cd /home/federico/bioinfo/Mince/build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/canoncmp.dir/link.txt --verbose=1
/usr/bin/c++ -DHAVE_LOGGER -funroll-loops -fPIC -O3 -DHAVE_ANSI_TERM -DHAVE_SSTREAM -DHAVE_CONFIG_H -Wall -std=c++11 -Wno-unused-local-typedefs CMakeFiles/canoncmp.dir/CanonicalCompare.cpp.o -o canoncmp -L/home/federico/bioinfo/Mince/lib -L/home/federico/bioinfo/Mince/external/install/lib -rdynamic libminceutils.a -Wl,-Bstatic -lboost_iostreams -lboost_filesystem -lboost_system -lboost_thread -lboost_timer -lboost_program_options -lboost_serialization -lpthread -lz -Wl,-Bdynamic ../../external/install/lib/libjellyfish-2.0.a -lpthread -lm -ltbb -ltbbmalloc -lgomp -lrt -Wl,-rpath,"\$ORIGIN/../lib:\$ORIGIN/../../lib:\$ORIGIN/"
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libpthread.a(ptw-pause.o): nella funzione "__pause_nocancel":
/build/eglibc-MjiXCM/eglibc-2.19/nptl/../sysdeps/unix/syscall-template.S:81: riferimento non definito a "__syscall_error"
/build/eglibc-MjiXCM/eglibc-2.19/nptl/../sysdeps/unix/syscall-template.S:81: riferimento non definito a "__syscall_error"
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libpthread.a(nptl-init.o): nella funzione "__pthread_initialize_minimal_internal":
/build/eglibc-MjiXCM/eglibc-2.19/nptl/nptl-init.c:285: undefined reference to "__libc_setup_tls"
/build/eglibc-MjiXCM/eglibc-2.19/nptl/nptl-init.c:303: undefined reference to "_dl_cpuclock_offset"
/build/eglibc-MjiXCM/eglibc-2.19/nptl/nptl-init.c:419: undefined reference to "_dl_pagesize"
/build/eglibc-MjiXCM/eglibc-2.19/nptl/nptl-init.c:428: undefined reference to "_dl_pagesize"
/build/eglibc-MjiXCM/eglibc-2.19/nptl/nptl-init.c:448: undefined reference to "_dl_init_static_tls"
/build/eglibc-MjiXCM/eglibc-2.19/nptl/nptl-init.c:450: undefined reference to "_dl_wait_lookup_done"
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libpthread.a(nptl-init.o): nella funzione "__pthread_get_minstack":
/build/eglibc-MjiXCM/eglibc-2.19/nptl/nptl-init.c:471: undefined reference to "_dl_pagesize"
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libpthread.a(pthread_create.o): nella funzione "allocate_stack":
/build/eglibc-MjiXCM/eglibc-2.19/nptl/allocatestack.c:475: undefined reference to "_dl_stack_flags"
/build/eglibc-MjiXCM/eglibc-2.19/nptl/allocatestack.c:614: undefined reference to "_dl_stack_flags"
collect2: error: ld returned 1 exit status
make[2]: *** [src/canoncmp] Error 1
make[2]: uscita dalla directory "/home/federico/bioinfo/Mince/build"
make[1]: *** [src/CMakeFiles/canoncmp.dir/all] Errore 2
make[1]: uscita dalla directory "/home/federico/bioinfo/Mince/build"
make: *** [all] Error 2
So I managed to link correctly and run everything by selecting the failing command (i.e.
/usr/bin/cmake -E cmake_link_script CMakeFiles/canoncmp.dir/link.txt --verbose=1
/usr/bin/c++ -DHAVE_LOGGER -funroll-loops -fPIC -O3 -DHAVE_ANSI_TERM -DHAVE_SSTREAM -DHAVE_CONFIG_H -Wall -std=c++11 -Wno-unused-local-typedefs CMakeFiles/canoncmp.dir/CanonicalCompare.cpp.o -o canoncmp -L/home/federico/bioinfo/Mince/lib -L/home/federico/bioinfo/Mince/external/install/lib -rdynamic libminceutils.a -Wl,-Bstatic -lboost_iostreams -lboost_filesystem -lboost_system -lboost_thread -lboost_timer -lboost_program_options -lboost_serialization -lpthread -lz -Wl,-Bdynamic ../../external/install/lib/libjellyfish-2.0.a -lpthread -lm -ltbb -ltbbmalloc -lgomp -lrt -Wl,-rpath,"\$ORIGIN/../lib:\$ORIGIN/../../lib:\$ORIGIN/"
and replace -lpthread with -pthread but since I wanted to understand the code I wanted to open it and build it using Qtcreator or Codeblocks and use the debugger this is not working.
Any help is appreciated
EDIT= Title, since I found a workaround to build the project externally using -pthread I wonder if editing the file invoked by the make command would allow me to build from one of the IDE and debug the code.
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
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 launch a test for opengl on my kubuntu 64b.
Opengl, glew and freeglut are installed but when I compile it says that glut is not found.
CLEAN SUCCESSFUL (total time: 52ms)
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/rxp/NetBeansProjects/Cpptest'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/cpptest
make[2]: Entering directory `/home/rxp/NetBeansProjects/Cpptest'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++ -c -g -I../oglpg-8th-edition/include -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp
mkdir -p dist/Debug/GNU-Linux-x86
g++ -o dist/Debug/GNU-Linux-x86/cpptest build/Debug/GNU-Linux-x86/main.o -L../oglpg-8th-edition/lib -lGL -lGLEW -lGLU -lGLUT
/usr/bin/ld: cannot find -lGLUT
collect2: error: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/cpptest] Error 1
make[2]: Leaving directory `/home/rxp/NetBeansProjects/Cpptest'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/rxp/NetBeansProjects/Cpptest'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 358ms)
Could you help me ?
You're using -lGLUT. Note that the libraries are case sensitive, so you need to use -lglut instead.
In build command, the libraries should be linked this way:
-lGL -lGLEW -lGLU -lglut