Qt 5.0 Build Warning - qt

I have installed Qt 5.0 (the whole SDK) on Fedora 17. I have configured the compiler (GCC) and everything seems to be working fine, except that when I press "Ctrl-R" for having a demo of my GUI coding, I get the following error :
make: Entering directory `/home/Nisarg/Documents/Qt Projects/untitled-build-Desktop_Qt_5_0_1_GCC_32bit-Debug'
g++ -Wl,-rpath,/opt/Qt/5.0.1/gcc -Wl,-rpath,/opt/Qt/5.0.1/gcc/lib -o untitled main.o mainwindow.o moc_mainwindow.o -L/opt/Qt/5.0.1/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
**/usr/bin/ld: cannot find -lGL**
make: Leaving directory `/home/Nisarg/Documents/Qt Projects/untitled-build-Desktop_Qt_5_0_1_GCC_32bit-Debug'
collect2: error: ld returned 1 exit status
make: *** [untitled] Error 1
04:07:17: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled (kit: Desktop Qt 5.0.1 GCC 32bit)
When executing step 'Make'.
(The error above is that a file called -lGL is not found)
How do I go about solving this error ?

You will need to have the libGL development files installed. It's been awhile since I used Fedora, but check your package manager for a package named something like mesa-libGL-devel.

Related

Qt move label with mouse

So here's the thing: I downloaded the Qt 4.7 tar and I'm installing on Ubuntu 16. I unzip the downloaded folder and installed all libs that were preventing me to run the ./configure
After I could run the configure, the make runs but get an error at some point. Here's what I get when I run 'make configure' or 'make':
root#ubuntu:/home/gimenes/Downloads/qt-everywhere-opensource-src-4.7.0# make configure
/home/gimenes/Downloads/qt-everywhere-opensource-src-4.7.0/bin/qmake -spec mkspecs/linux-g++-64 -o Makefile projects.pro
make: /home/gimenes/Downloads/qt-everywhere-opensource-src-4.7.0/bin/qmake: Command not found
Makefile:1063: recipe for target 'Makefile' failed
make: *** [Makefile] Error 127
root#ubuntu:/home/gimenes/Downloads/qt-everywhere-opensource-src-4.7.0# make
/home/gimenes/Downloads/qt-everywhere-opensource-src-4.7.0/bin/qmake -spec mkspecs/linux-g++-64 -o Makefile projects.pro
make: /home/gimenes/Downloads/qt-everywhere-opensource-src-4.7.0/bin/qmake: Command not found
Makefile:1063: recipe for target 'Makefile' failed
make: *** [Makefile] Error 127
I really appreciate the help, Ty :D

Errors building QT 5.5.1 source code on Win32

I'm trying building new version 5.5.1 on win32
After
configure -static -release -opensource -qt-sql-sqlite –platform win32-g++ -opengl desktop
and
MinGW-make
after just one minute:
c:\mingw\include\math.h: In function 'float hypotf(float, float)':
c:\mingw\include\math.h:635:30: error: '_hypot' was not declared in this scope
{ return (float)(_hypot (x, y)); }
^
Makefile.Release:316: recipe for target '.obj/release/moc.o' failed
mingw32-make[4]: *** [.obj/release/moc.o] Error 1
mingw32-make[4]: Leaving directory 'c:/Qt/5.5/qt-everywhere-opensource-src-5.5.1
/qtbase/src/tools/moc'
Makefile:34: recipe for target 'release' failed
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory 'c:/Qt/5.5/qt-everywhere-opensource-src-5.5.1
/qtbase/src/tools/moc'
Makefile:86: recipe for target 'sub-moc-make_first' failed
mingw32-make[2]: *** [sub-moc-make_first] Error 2
mingw32-make[2]: Leaving directory 'c:/Qt/5.5/qt-everywhere-opensource-src-5.5.1
/qtbase/src'
Makefile:41: recipe for target 'sub-src-make_first' failed
mingw32-make[1]: *** [sub-src-make_first] Error 2
mingw32-make[1]: Leaving directory 'c:/Qt/5.5/qt-everywhere-opensource-src-5.5.1
/qtbase'
Makefile:68: recipe for target 'module-qtbase-make_first' failed
mingw32-make: *** [module-qtbase-make_first] Error 2
I read that maybe possibly perform construction msvc or try mingw64 but I need it on Windows 32 with platform win32-g++
You really can not build this version with win32 and win32-g++ platform??
Any suggestions please, welcome any help.
SOLUTION.................................................................................................................................................
You can compile QT 5.5.1 with MinGW-64 project.
This project also works on 32 bits.
It´s not possible to compile with the "typical" version minimalist, neither changing the libraries. MinGW-64 project is not available from MinGW Installation Manager, I do not understand this and dislike me as an advocate for alternatives like mingw, I could always download from this manager all I need, now this manager... should improve.
After installing MinGW-64 project in all programs MinGW-64 project Run terminal
cd pathQTconfigure
configure -static -release -opensource –platform win32-g++ -opengl desktop
mingw-make
THANKS TO ALL :)

WKHTMLTOPDF with Patched QT Ubuntu 14.04 Errors during compiling

I am trying to compile the wkhtmltopdf with patched qt using these instructions and when i get to the make && make install it gives me an error has anyone else done this on Ubuntu 14.04? I can't figure out what to do from here.
these are the instructions i am following i know they are not for 14.04 but i hoped they would have worked https://gist.github.com/Zauberfisch/8773593
This is the error i get:
cd src/lib/ && make -f Makefile make[1]: Entering directory /temp/wkhtmltopdf/src/lib' rm -f libwkhtmltox.so.0.12.1 libwkhtmltox.so libwkhtmltox.so.0 libwkhtmltox.so.0.12 g++ -Wl,-O1 -Wl,-rpath,/temp/wkqt/lib -shared -Wl,-soname,libwkhtmltox.so.0 -o libwkhtmltox.so.0.12.1 ../../build/loadsettings.o ../../build/multipageloader.o ../../build/tempfile.o ../../build/converter.o ../../build/websettings.o ../../build/reflect.o ../../build/utilities.o ../../build/pdfsettings.o ../../build/pdfconverter.o ../../build/outline.o ../../build/tocstylesheet.o ../../build/imagesettings.o ../../build/imageconverter.o ../../build/pdf_c_bindings.o ../../build/image_c_bindings.o ../../build/moc_multipageloader_p.o ../../build/moc_converter_p.o ../../build/moc_pdfconverter_p.o ../../build/moc_imageconverter_p.o ../../build/moc_pdf_c_bindings_p.o ../../build/moc_image_c_bindings_p.o ../../build/moc_converter.o ../../build/moc_multipageloader.o ../../build/moc_utilities.o ../../build/moc_pdfconverter.o ../../build/moc_imageconverter.o ../../build/qrc_wkhtmltopdf.o -L/temp/wkqt/lib -lQtWebKit -lQtSvg -L/temp/wkqt/lib -L/usr/X11R6/lib -lQtXmlPatterns -lQtGui -lQtNetwork -lQtCore -lpthread /usr/bin/ld: ../../build/qrc_wkhtmltopdf.o: relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC ../../build/qrc_wkhtmltopdf.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[1]: * [../../bin/libwkhtmltox.so.0.12.1] Error 1 make[1]: Leaving directory `/temp/wkhtmltopdf/src/lib' make: * [sub-src-lib-make_default-ordered] Error 2
I downloaded a binary from their site that already had the QT build and that fixed the issue for me. Thanks!

Error while testing QT test project

I have started using QT on Kubuntu. I first installed g++ via Package Manager. Then I installed QT 5.0.1. I then made a test project to check if everything is correct or not. Then I got following issues.
- cannot find -lGL
- collect2: error:Id returned 1 exit status
I saw in Compile Output
11:32:05: Running steps for project untitled2...
11:32:05: Configuration unchanged, skipping qmake step.
11:32:05: Starting: "/usr/bin/make" -w
make: Entering directory `/home/harsh/Desktop/untitled2-build-Desktop_Qt_5_0_1_GCC_64bit-Debug'
g++ -m64 -Wl,-rpath,/home/harsh/Qt5.0.1/5.0.1/gcc_64 -Wl,-rpath,/home/harsh/Qt5.0.1/5.0.1/gcc_64/lib -o untitled2 main.o mainwindow.o moc_mainwindow. -L/usr/X11R6/lib64 -L/home/harsh/Qt5.0.1/5.0.1/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [untitled2] Error 1
make: Leaving directory `/home/harsh/Desktop/untitled2-build-Desktop_Qt_5_0_1_GCC_64bit-Debug'
11:32:05: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled2 (kit: Desktop Qt 5.0.1 GCC 64bit)
When executing step 'Make'
Please help me fix these errors.
Qt != QT
The error tells you what is wrong, the compiler cannot find libGL.so. It's usually in /usr/lib64.

/usr/bin/ld: cannot find -lfreetype qt

Compiling on Fedora 10.
I am using qt for the first time. I started by creating a simple GUI application with all the default settings. When I tried to build the project I got the following error messages.
However, when I did a search for -lfreetype I found it in the following directory.
/usr/lib/libfreetype.so.6
/usr/lib/libfreetype.so.6.3.18
Is there anyway to resolve this issue?
Many thanks for any advice
Running build steps for project test1...
Creating gdb macros library...
Configuration unchanged, skipping QMake step.
Starting: /usr/bin/make debug -w
make: Entering directory `/home/steve/projects/qt/test1/test1'
/usr/bin/make -f Makefile.Debug
make[1]: Entering directory `/home/steve/projects/qt/test1/test1'
g++ -Wl,-rpath,/opt/qtsdk-2009.01/qt/lib -o test1 debug/main.o
debug/mainwindow.o debug/moc_mainwindow.o
-L/opt/qtsdk-2009.01/qt/lib
-lQtGui -L/opt/qtsdk-2009.01/qt/lib -L/usr/X11R6/lib
-pthread -lfreetype
-lgobject-2.0 -lSM -lICE -pthread -pthread
-lXrender -lfontconfig
-lXext -lX11 -lQtCore -lm -pthread -lgthread-2.0 -lrt
-lglib-2.0 -ldl -lpthread
/usr/bin/ld: cannot find -lfreetype
collect2: ld returned 1 exit status
make[1]: *** [test1] Error 1
make[1]: Leaving directory `/home/steve/projects/qt/test1/test1'
make: *** [debug] Error 2
make: Leaving directory `/home/steve/projects/qt/test1/test1'
Exited with code 2.
Error while building project test1
When executing build step 'Make'
You have to install the freetype-devel package. The devel package contains the header files which in the case of freetype shoud be located at: /usr/include/freetype.
I had the same problem on Ubuntu 8.10, QT 4.5. I "fixed" it with the following bizarre hack:
After the build fails, rename the QT lib directory to something else - e.g. "mv ../../qtsdk-2009.01/qt/lib ../../qtsdk-2009.01/qt/lib2"
Run "make" again, and it will fail again.
Restore the lib directory
Run "make" again, and now it works.
I have no idea why this happens.
Install freetype1-dev libgtk2.0-dev
and it will compile ok.
On Ubuntu 9.04, installing freetype1-dev & libgtk2.0-dev solves this problem.
But to surprise everyone the hack mentioned by Ross also works, I would really like to know how and why.. M looking into the source code of QTcreator to see if i can find out the reason why. If any one already know the reason, please let me know.
Thanks..
Just installed a newly fresh ubuntu 9.04 (dell D820)- installed qt creator nothing else - same problem
use option from S R that works because it needs libgtk2.0-dev (this will also load freetype6 ) installed from package manager.
Same effect you will see if you also install qt designer from package manager (it will install all the right packages
regards
Nico
I had same problems with Elive, freetype1-dev and libgtk2.0-dev and for the /usr/bin/ld: cannot find -lSM thing xorg-dev fixed the problem.
The first thing you have to make sure is that you have libfreetype.so installed in your computer. Use the command 'locate libfreetype.so', and you may find there is a '/usr/lib/libfreetype.so.6' in the result. The compile software can't identify libfreetype.so.6 as a shared library, so, you have to make a symbolic link to the target. Use the command 'ln -s /usr/lib/libfreetype.so.6 /usr/lib/libfreetype.so', when you compile the program again, you will find the error had gone. You can also solve the errors likely. Good Luck!

Resources