1

I'm still new to Qt. In the past I used to download Qt on a computer and install it without any problems and I get immediate access to all Qt SDK resources including QtCreator.

Now, I downloaded Qt SDK 4.8.3 and after some reading I ended up installing Windows SDK 7. Then I extracted Qt files to C:\Qt. I also added C:\Qt\4.8.3\ to the system path. Then I ran configure which is concluded with no errors. Then I attempted to run nmake which failed with the following error:

Generating Code... link /LIBPATH:"c:\Qt\4.8.3\lib" /LIBPATH:"c:\Qt\4.8.3\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /BASE:0x67000000 /DEBUG /DLL /MANIFEST /MANIFESTFILE:"tmp\obj\debug_shared\QtCored.intermediate.manifest" /VERSION:4.83 /OUT:....\lib\QtCored4.dll @C:\Users\MELKAM~1\AppData\Local\Temp\nm5A03.tmp
Creating library ....\lib\QtCored4.lib and object ....\lib\QtCored4.exp LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\Bin\amd64\link.EXE"' : return code '0x463' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0 \VC\Bin\amd64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.

Now I have tried the above twice with no luck. Any pointer where should I look? any suggestions are appreciated.

Thanks.

Phlucious
  • 3,704
  • 28
  • 61
mbadawi23
  • 1,029
  • 2
  • 21
  • 43

3 Answers3

5

What are you compiling with? MSVC or mingw? If the former, I have found this link incredibly helpful... http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/

I have followed his instructions for 64bit and 32bit builds many times.

Edit: You have your qt build configured for a MSVC2010 (1600) build, so it's looking in the "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\nmake.exe" directory, which doesn't exist if you only have MSVC2012 (which is version 11.0).

Qt 4.8 doesn't officially support MSVC2012 (yet?), but if you really want to use 2012 then you can try the suggestions at this link. It's complicated, especially if this is your first source build, but seems do-able if you're willing to tinker with the Qt source code.

Community
  • 1
  • 1
Phlucious
  • 3,704
  • 28
  • 61
  • 2
    In particular, if you're using Visual Studio 2010 then you must make sure that you have Service Pack 1 installed. [This link](http://stackoverflow.com/questions/10888391/link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-c) has more on the specific linker error that you are receiving. – Phlucious Nov 09 '12 at 19:49
  • The guide above is a good guide, but still it didn't work for me. I forgot to mention that I don't have Visual Studio 2010 installed. I have Windows SDK 7.1 installed and Visual Studio Express 2012 installed as well. – mbadawi23 Nov 09 '12 at 21:28
  • 1
    I'm not familiar with 2012, but it supposedly works with Express 2010. You'll need to change your MSVC version to 1700 in the make specs for 2012, but it may entail more than that. Make sure you use jom for your compilation. If you're new to Qt it might be worth getting your hands on a copy of 2010 Express and save some of the hassle. – Phlucious Nov 10 '12 at 00:03
  • I just took a closer look at your error reports and noticed that you have it configured for MSVC2010. Check my edited answer. – Phlucious Dec 20 '12 at 16:30
1

I had the same issue. the problem was installing visual studio 2012 on a machine with visual studio 2010. May be this can help https://stackoverflow.com/a/15132209/1933829

Community
  • 1
  • 1
Behzad
  • 31
  • 3
0

Did you run configure from the 64bit tools command tool in vs?
Did you add -platform win32-msvc2010 to the configure commandline (yes even for 64bit builds you need -win32- )

Martin Beckett
  • 94,801
  • 28
  • 188
  • 263