September 6, 2011

Luca Luca
Ant Farmer
589 posts

QtSDK 1.1.3 && toolchain problem

Page  
1

Hi all,
I installed the new SDK and I’m trying to compile one my old project.

The .pro has :

  1. ....
  2. ....
  3. linux-g++ {
  4.    INCLUDEPATH += ../modbus_x86
  5.     QMAKE_LIBDIR += ../modbus_x86
  6.     LIBS          += -lmodbus
  7. }
  8.  
  9. linux-arm-gnueabi-g++ {
  10.    INCLUDEPATH += ../modbus_beagle
  11.     QMAKE_LIBDIR += ../modbus_beagle
  12.     LIBS          += -lmodbus
  13. }
  14. ....
  15. ....
  16. ....

While compiling for x86 it doesn’t find modbus.h . But the file is ../modbus_x86 .
It seems that linux-g++ isn’t recognized.

I hadn’t this problem with old SDK.

How can I solve the problem?

20 replies

September 6, 2011

Luca Luca
Ant Farmer
589 posts

I’ve seen that replacing linux-g++ in the .pro with linux-g++-32 now I can compile for x86.

What should I put in .pro for arm ?

September 6, 2011

Luca Luca
Ant Farmer
589 posts

I found a possible problem.

In Qt Creator -> Projects -> Build Steps

there is:

  1. qmake: qmake satellite.pro -r -spec linux-g++-32

so it seems always take linux-g++-32 for every toolchain I select.

I solved the problem removing the wron build step and adding a new “Custom Process Step”:

Command: /opt/qt4-4.7.4-beagle/bin/qmake
Command arguments: /home/luca/DATI/gei/qt4/progetto_solarwind/satellite/satellite_2/satellite/satellite.pro

and putting this build step on the top of the build steps.

Is there another way to change the default:

  1. qmake: qmake satellite.pro -r -spec linux-g++-32

in the Build Steps?

September 8, 2011

Luca Luca
Ant Farmer
589 posts

I found a Bug Report:

https://bugreports.qt.nokia.com/browse/QTCREATORBUG-5917

So I hope it will be solved soon …

September 8, 2011

Volker Volker
Robot Herder
5428 posts

You can leave the qmake build step. Just expand it and you will find an input field for command line switches. If you add “-spec name-of-your-spec” to it, the default is replaced by your value.

You can vote for QTCREATORBUG-5756 [bugreports.qt.nokia.com], this is the replacement report for QTCREATORBUG-5756 [bugreports.qt.nokia.com].

September 9, 2011

Luca Luca
Ant Farmer
589 posts

Thnaks Volker,
I just tried and it works.

I seen that before writing the “additional aruments” the “Effective qmake call” was:

  1. qmake /home/luca/DATI/gei/qt4/progetto_solarwind/satellite/satellite_2/satellite/satellite.pro -r -spec linux-g++-32

next when typing “-spec linux-g++” the “Effective qmake call” become:

  1. qmake /home/luca/DATI/gei/qt4/progetto_solarwind/satellite/satellite_2/satellite/satellite.pro -r -spec linux-g++

For me it should be better to avoid at all the argument “-spec” to let Qt to get the “default”.
Do you think it’s possible?

September 9, 2011

Volker Volker
Robot Herder
5428 posts

As far as I know, the Trolls are on it. You can vote for QTCREATORBUG-5756 [bugreports.qt.nokia.com], that could rise the priority :-)

September 9, 2011

Luca Luca
Ant Farmer
589 posts

Ok, I just voted it…

Thanks again.

September 11, 2011

ibingow ibingow
Lab Rat
27 posts

usually i use linux-g++*

September 16, 2011

Luca Luca
Ant Farmer
589 posts

Volker wrote:
You can leave the qmake build step. Just expand it and you will find an input field for command line switches. If you add “-spec name-of-your-spec” to it, the default is replaced by your value.

You can vote for QTCREATORBUG-5756 [bugreports.qt.nokia.com], this is the replacement report for QTCREATORBUG-5756 [bugreports.qt.nokia.com].

I just found another workaround to use the default spec instead of using “-spec name-of-your-spec” I only need “-spec default”.

September 17, 2011

Tobias Hunger Tobias Hunger
Mad Scientist
3149 posts

Try the master branch: That should override the spec file way less often. I would really appreciate your feed back: Do the changes improve the situation for you guys?

September 18, 2011

Luca Luca
Ant Farmer
589 posts
Tobias Hunger wrote:
Try the master branch: That should override the spec file way less often. I would really appreciate your feed back: Do the changes improve the situation for you guys?

Sorry Tobias,
I didn’t understand very well what you mean with “try the master branch”?
If you can explain me better I can try.

September 18, 2011

Volker Volker
Robot Herder
5428 posts
Luca wrote:
Sorry Tobias, I didn’t understand very well what you mean with “try the master branch”? If you can explain me better I can try.

He meant to use the sources of Qt Creator at gitorious [qt.gitorious.org]. You would have to checkt out the master branch and build Creator manually. To my knowledge, there are no nightly builds or similar prebuilt development snapshots available.

September 18, 2011

Luca Luca
Ant Farmer
589 posts

I tried the Qt Creator compiled from qt.gitorious.org .
Now there is:

  1. -spec linux-g++

as default choice.

It should be better to have nothing as default spec .

September 19, 2011

Tobias Hunger Tobias Hunger
Mad Scientist
3149 posts

What system are you working on? I guess a intel based Linux? 64bit or 32bit?

What kind of system are you developing for?

September 19, 2011

Luca Luca
Ant Farmer
589 posts

I’m working on a Slackware Linux 13.37 (32 bit) and I’m developing for the same system and for a BeagleBoard xM (Angstrom OS).

Page  
1

  ‹‹ Configure qmake to use MSVC toolchain      QtCreator and CMake ››

You must log in to post a reply. Not a member yet? Register here!