2

I want to use Qt 4.7.3 with Visual Studio 2013. When I run for "configure.exe -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-qt3support -no-multimedia -no-ltcg" command on "Developer Command Prompt for VS2013", after one or two mins it gives me a qmake fail with return code 2.

"Stop. Building qmake failed, return code 2"

I know that I have the configure.exe file on the right directory.

How can I solve this problem?

dario
  • 5,149
  • 12
  • 28
  • 32
ahmetg
  • 117
  • 1
  • 4
  • 13

2 Answers2

1

I was able to resolve this problem by modifying the qmake\Makefile.win32 file and changing

CFLAGS_EXTRA      = /MP

to

CFLAGS_EXTRA      = /MP /DPATH_MAX=4096
kicken
  • 2,122
  • 14
  • 17
0

Try following the instructions here: http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/

The only difference being that I've changed "msvc2010" to "msvc2012" when it occurs. Also make sure you are running "configure.exe" inside the context of the visual studio command line (Start > All Programs > Microsoft Visual Studio 2012 > Visual Studio Tools )

PS: Jom is unnecessary, but useful since it will allow you to use more than one core.

EDIT: I tried to follow my own instructions here (was waiting for it to build) and I'm also failing on the same spot with the same return value.
This is where it starts getting errors:

....\corelib\io\qfsfileengine_win.cpp(1012) : error C2065: 'PATH_MAX' : undeclared identifier

...then this happens

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0 \VC\BIN\cl.EXE"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0 \VC\BIN\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.

Darn. I'll keep trying - will edit answer if I find out what's going on.

This answer might help? Compiling Qt 4.8.x for Visual Studio 2012

Community
  • 1
  • 1
Futuza
  • 144
  • 8