Author Topic: Porting QtCreator - library problems (.a instead of .lib)  (Read 6833 times)

Mentore

  • Full Member
  • ***
  • Posts: 163
  • Karma: +6/-0
    • View Profile
Porting QtCreator - library problems (.a instead of .lib)
« on: May 13, 2015, 05:04:50 pm »
Hello all.
I'm having some strange problems in porting Qt gui applications, in this case QtCreator 2.0 (I can't use QtCreator 1.31 due to some strange compatibility issues with the latest Qt 4.7.3, so I decided to try and port one of the last versions which do not require Qt >= 4.8).

I'm following, AFAIK, all the correct informations. Qt include files, Qt binaries and Qt libraries are in /usr/include/qt4, /usr/bin and /usr/lib/qt4 respectively. QTDIR is set on \usr\bin as well (I copied headers and libraries into places similar to those used in linux, to try and be more comfortable with unix makefiles).

After set MAKESHELL=cmd.exe qmake worked without problems, but after issuing make the result was this error message:

******
[U:\progetti\qt-creator-2.0.0-src]make
cd src && make -f Makefile
make[1]: Entering directory `U:/progetti/qt-creator-2.0.0-src/src'
cd libs && make -f Makefile
make[2]: Entering directory `U:/progetti/qt-creator-2.0.0-src/src/libs'
cd qtconcurrent && make -f Makefile
make[3]: Entering directory `U:/progetti/qt-creator-2.0.0-src/src/libs/qtconcurrent'
g++ -Zomf -Zstack 0x2000 -Zlinker "DISABLE 1121" -s -Zdll -Zhigh-mem -Zmap -o ..\..\..\lib\qtcreator\QtConcurrent.dll ..\..\..\lib\qtcreator\QtConcurrent.def -W
l,@OBJECTS.QtConcurrent.rsp -Lu:\usr\lib -Lu:\progetti\qt-creator-2.0.0-src\lib\qtcreator -lQtGui -lQtCore
weakld: cannot open library file 'u:\usr\lib\qt4\QtGui_s.a'.
emxomfld: weak prelinker failed. (rc=8)
make[3]: *** [..\..\..\lib\qtcreator\QtConcurrent.dll] Error 1
make[3]: Leaving directory `U:/progetti/qt-creator-2.0.0-src/src/libs/qtconcurrent'
make[2]: *** [sub-qtconcurrent-make_default-ordered] Error 2
make[2]: Leaving directory `U:/progetti/qt-creator-2.0.0-src/src/libs'
make[1]: *** [sub-libs-make_default-ordered] Error 2
make[1]: Leaving directory `U:/progetti/qt-creator-2.0.0-src/src'
make: *** [sub-src-make_default-ordered] Error 2

******

It seems that the linker is trying to access QtGui_s.a instead of QtGui4.lib, which is the library file in our Qt distribution.

I remember I was able to port some Qt 4 application with 4.5 and 4.6 release, but now I'm stuck and I don't know what the problem might be.

Some help, anyone?

Mentore

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4805
  • Karma: +99/-1
    • View Profile
Re: Porting QtCreator - library problems (.a instead of .lib)
« Reply #1 on: May 13, 2015, 05:11:29 pm »
Search through your makefiles and rsp files for QtGui and change it too QtGui4.

Mentore

  • Full Member
  • ***
  • Posts: 163
  • Karma: +6/-0
    • View Profile
Re: Porting QtCreator - library problems (.a instead of .lib)
« Reply #2 on: May 13, 2015, 09:43:37 pm »
Search through your makefiles and rsp files for QtGui and change it too QtGui4.

Done.
Indeed it seems working good... Stupid me for not taking this into account. Now I got stuck on one of the definitions, namely IDE_TEST_DIR which seems impossible to parse correctly. I will try to solve this problem and report as soon as I have more informations.

Mentore

TeLLie

  • Full Member
  • ***
  • Posts: 233
  • Karma: +11/-0
    • View Profile
Re: Porting QtCreator - library problems (.a instead of .lib)
« Reply #3 on: May 13, 2015, 11:23:58 pm »
Hi Mentore,

When i look in diff file from v1.3.1 i see about the IDE_TEST_DIR

-DEFINES += IDE_TEST_DIR=\\\"$$IDE_SOURCE_TREE\\\"
+os2:DEFINES += IDE_TEST_DIR=\'\"$$IDE_SOURCE_TREE\"\'
+else:DEFINES += IDE_TEST_DIR=\\\"$$IDE_SOURCE_TREE\\\"


Dunno if this would help

Mentore

  • Full Member
  • ***
  • Posts: 163
  • Karma: +6/-0
    • View Profile
Re: Porting QtCreator - library problems (.a instead of .lib)
« Reply #4 on: May 14, 2015, 09:08:29 am »
Hi Mentore,

When i look in diff file from v1.3.1 i see about the IDE_TEST_DIR

-DEFINES += IDE_TEST_DIR=\\\"$$IDE_SOURCE_TREE\\\"
+os2:DEFINES += IDE_TEST_DIR=\'\"$$IDE_SOURCE_TREE\"\'
+else:DEFINES += IDE_TEST_DIR=\\\"$$IDE_SOURCE_TREE\\\"


Dunno if this would help

Yes, this was one of the points in my analysis. Compilation errors arise from the real path, though - I will state myself more clear as soon as I get back to compiling.

Mentore