Results 1 to 8 of 8

Thread: Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

  1. #1
    Join Date
    Dec 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

    As the title says. I get linings problems when trying to compile Qt 4.7.1 with Visual Studio 2010 Professional on Windows 7 64 bits.

    Used:
    Qt Code:
    1. configure -platform win32-msvc2010 when configuring the make file
    To copy to clipboard, switch view to plain text mode 
    and then:
    Qt Code:
    1. nmake
    To copy to clipboard, switch view to plain text mode 

    error code:
    Qt Code:
    1. link /LIBPATH:"c:\Qt\4.7.1\lib" /LIBPATH:"c:\Qt\4.7.1\lib" /NOLOGO /BASE
    2. :0x65000000 /DEBUG /DLL /MANIFEST /MANIFESTFILE:"tmp\obj\debug_shared\QtGuid.int
    3. ermediate.manifest" /VERSION:4.71 /OUT:..\..\lib\QtGuid4.dll @C:\Users\Mattias\A
    4. ppData\Local\Temp\nmA336.tmp
    5. LINK : fatal error LNK1104: cannot open file 'libpng.lib'
    6. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    7. \VC\BIN\link.EXE"' : return code '0x450'
    8. Stop.
    9. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    10. \VC\BIN\nmake.exe"' : return code '0x2'
    11. Stop.
    12. NMAKE : fatal error U1077: 'cd' : return code '0x2'
    13. Stop.
    14.  
    15. c:\Qt\4.7.1>
    To copy to clipboard, switch view to plain text mode 

    Got another error earlier where zdll.lib was missing. Found a post where the poster got it to work by downloading that file and placing it in the lib directory in VS2010's folder. That solved that error. Haven't found any information about this though.

    I'm using the VS2010 Command Prompt.
    Thank you for your time /Mattias

  2. #2
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

    It seems that you configured Qt to use your own supplied (system) png and zlib. Examine the documentation for configure flags and reconfigure it and rebuild it if this is not what you intended.

    Qt Code:
    1. configure -help
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Dec 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

    Using the flags: -qt-libpng -qt-zlib -qt-libmng -qt-libtiff -qt-libjpeg solved my problems. Thank you for your help!

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

    Isn't

    Qt Code:
    1. win32-msvc2010
    To copy to clipboard, switch view to plain text mode 

    32 bit?

    Might there be problems between 64bit libraries and 32bit libraries?

  5. #5
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

    He isn't trying to build 64bit libs, though. He's just trying to rebuild the 32bit libs on Windows 7 x64.
    NMAKE : fatal error U1077: '"C:\Program Files --> (x86) <---\Microsoft Visual Studio 10.0
    Either way, it wouldn't make a difference.

  6. #6
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

    I mean this line:
    Qt Code:
    1. LINK : fatal error LNK1104: cannot open file 'libpng.lib'
    To copy to clipboard, switch view to plain text mode 
    If he installed such a file, and the linker still can't open it, it might be because of several problems. But because I saw both 64bit and 32bit in the same post, that would have been my first guess.

  7. #7
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

    You do realize that both the x86 and x64 libs are built from the same configuration right?
    Qt Code:
    1. win32-msvc2010
    To copy to clipboard, switch view to plain text mode 
    when fed to configure can lead to x86 or x64 output.

  8. #8
    Join Date
    Dec 2009
    Posts
    8
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Linking fail when compileing Qt 4.7.1 with VS2010 on win 7 x64

    I was writing a post but I figured out the problem. In order to install Qt, I opened a console to run 'configure -platform win32-g++'. As it did not find mingw32-make i changed windows PATH variable to include NodiaQtSDK\mingw\bin. Ater changing it I tried to install several times at the same console . While I was trying to copy and paste the instalation log here I notice that the PATH variable was not including the required mingw directory yet. Closed and opened the console again and voilá!
    Decided to keep it here just in case someone as "distracted" as me is having the same problem!

    By the way, is it possible to comple the whole thing to win64, using some sort of mingw64? I will google it around but any answear here would be nice.
    Last edited by ferrabras; 7th February 2011 at 13:46.

Similar Threads

  1. Replies: 0
    Last Post: 12th April 2010, 10:21
  2. VS2010 Support
    By Dato0011 in forum Qt Tools
    Replies: 3
    Last Post: 19th February 2010, 17:57
  3. QItemSelectionModel::selectedIndexes() fail
    By Stapl in forum Qt Programming
    Replies: 1
    Last Post: 22nd October 2009, 01:54
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. OT : QSql - connections fail after a while.
    By Harvey West in forum Qt Programming
    Replies: 6
    Last Post: 19th January 2007, 13:46

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.