PDA

View Full Version : Qt and linux: how can i compil ?



21did21
2nd September 2011, 08:34
hello world,
i have installed Qt on my linux OS (i have both windows and Linux), all things works on windows but when i use linux i can compil my project.
This is my error message:

(see attached item)

how can i solve this problem please ?
i have tried to delete the file ".pro.user" before using the Qmake command but it don't change something...

high_flyer
2nd September 2011, 08:55
Is there 'C:' on linux?
Or are you working on a dual boot system, and you mounted your windows partition under linux as well?
If so, you didn't install Qt on linux, and using the one on windows is not really a good idea.

SixDegrees
2nd September 2011, 11:10
It looks like Qt can't figure out which qmakespecs file to use during compilation/linking. This file contains all the flags needed for building on a particular platform; there are typically several of them to choose from, installed wherever Qt is installed - looks like /usr/share/qt/mkspecs on your system. Root around in there and find one that looks like a good match - linux-g++ will probably do - and set your QMAKESPEC environment variable to that value: 'setenv QMAKESPEC linux-g++' will do in the C shell. Then try again.

It does seem odd that your current QMAKESPEC is set for a Windows system, so pay attention to high_flyer's post as well and make sure you're not trying to use a Windows installation under Linux.

21did21
2nd September 2011, 15:25
thank you for your help

i have a dual boot:
- windows 7 with QtSDK under windows
- ubuntu with QtSDK under linux

i have make all my project on windows but now i just try to compil under linux but it don't work even with the linux Qt version.

sixDegrees:
i don't understand very well, what should i do this this /user/share/lib ?

21did21
3rd September 2011, 17:47
i have found something very interesting in the Qt option (on the left when i click on the project button) this is the QMAKE options:

-config: release
-additional arguments: -spec c:QtSDKDesktopQt4.7.3mingwmkspecswin32-g++ QMLJSDEBUGGER_PATH=C:/QtSDK/QtCreator/share/qtcreator/qml/qmljsdebugger
-call Qmake:
CONFIG+=debug_and_release -spec c:QtSDKDesktopQt4.7.3mingwmkspecswin32-g++ QMLJSDEBUGGER_PATH=C:/QtSDK/QtCreator/share/qtcreator/qml/qmljsdebugger

we can see that QtCreator doesn't go on the good place to launch QMAKE on linux; but i don't know what are the thing that i must have to put to replace them.
i just know that Qt is installed here: USER/SHARE/Qt4

can you help me please to replace this lines ? thanks a lot

EDIT:
I searched in the default settings qtcreator and it will appear by default in a folder windows

I must show him the way to install the linux QMake but I do not know, I just know that my installation is in USR/SHARE/Qt4
but then I do not know where to find the PATH QMake

can you tell me please?

high_flyer
5th September 2011, 09:44
can you tell me please?
We did tell you, but you don't seem to be reading, or to understand...

21did21
5th September 2011, 10:47
excuse me for the late:
=> my problem is solved

i have found the path to correct it

ps: sorry for my bad understanding my english is bad :o

see you