Results 1 to 4 of 4

Thread: qt 4.7.4 linking error, missing --enable-auto-import

  1. #1
    Join Date
    Aug 2010
    Posts
    6
    Thanks
    3
    Thanked 3 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qt 4.7.4 linking error, missing --enable-auto-import

    I compiled qwt 6.0.1 dynamic library with qt 4.7.4, and added it to my qt project,
    but there is a linking warning saying missing --enable-auto-import option,
    I checked the qmake.conf file in mkspecs/win32-g++, QMAKE_LFLAGS is empty,
    QMAKE_LFLAGS =
    but in qt 4.7.3, QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
    so I added the -Wl,-enable-auto-import to qt 4.7.4, it worked.
    I am confused.

    env: win7 32bit, qt 4.7.4, qtcreator 2.3.0
    log:

    g++ -mthreads -Wl,-subsystem,windows -o debug\mpbs.exe object_script.mpbs.Debug -L"c:\Qt\4.7.4\lib" -lmingw32 -lqtmaind debug\mpbs_res.o -Ld:/qwt-6.0.1/lib -lqwtd -lQAxContainerd -lole32 -loleaut32 -luser32 -lgdi32 -ladvapi32 -luuid -lQtGuid4 -lQtCored4

    Info: resolving QwtPlot::staticMetaObject by linking to __imp___ZN7QwtPlot16staticMetaObjectE (auto-import)

    c:/qt/qtcreator-2.3.0/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
    This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
    Last edited by lvdong; 12th September 2011 at 02:48.

  2. The following 3 users say thank you to lvdong for this useful post:

    corrado1972 (12th April 2012), gib (10th December 2011), Niels Holst (6th October 2011)

  3. #2
    Join Date
    Jun 2008
    Location
    Denmark
    Posts
    6
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt 4.7.4 linking error, missing --enable-auto-import

    I have the exact same problem after upgrading from Qt 4.7.3 to 4.7.4 in same environment as you. Projects with a DLL target now produces those infos and warnings I never saw before.
    And now my program (using those DLLs) crashes when I try to execute it! It goes "The application was unable to start correctly (0xc0000005)."

    I am impressed you managed to spot that change in the default flag setting for the linker. But how do we proceed?

    1. Why was the option changed? If it was for a good reason, I would not like to change it back. Beside I am managing an open source project and I do not want to instruct all contributors to hack that flag inside the Qt distribution.
    2. What is the correct way to set the linker flags in my own .pro file? In Help it says that we should not change QMAKE_LFLAGS.
    3. What about the other flags that were dropped in Qt 4.7.4? Under what circumstances should we worry about them?

  4. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,188
    Thanked 843 Times in 792 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qt 4.7.4 linking error, missing --enable-auto-import

    Better ask, where Qt developers are listing - or add bug report to their task tracker.

    When Qt 4.7.3 and 4.7.4 are incompatible it should qualify as a bug.

    Uwe

  5. The following user says thank you to Uwe for this useful post:

    Niels Holst (6th October 2011)

  6. #4
    Join Date
    Jun 2008
    Location
    Denmark
    Posts
    6
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt 4.7.4 linking error, missing --enable-auto-import

    Thanks, Uwe, just added this issue as a bug.

Similar Threads

  1. Odd QtCored4.dll error (not missing!)
    By Wasabi in forum Qt Programming
    Replies: 3
    Last Post: 11th May 2011, 23:07
  2. Replies: 2
    Last Post: 28th February 2011, 23:14
  3. Compiler error when calling QObject::connect. What am I missing?
    By themanwiththequestion in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2010, 14:33
  4. fatal error- missing -'QtUiToolsd.lib
    By razovy in forum Installation and Deployment
    Replies: 2
    Last Post: 20th June 2006, 08:55
  5. import library linking
    By bruce1007 in forum Qt Programming
    Replies: 6
    Last Post: 19th May 2006, 10:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.