0

I am building Qt4.8.5 with my VisualStudio2012 by follow instruction from this post. My machine is Win7. I got the following error on the stage of nmake.

The code triggers the error is this. The last return line is the line 327.

String DefaultLocalizationStrategy::contextMenuItemTagLookUpInDictionary(const String& selectedString)
{
#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
    UNUSED_PARAM(selectedString);
    return WEB_UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item");
#else
#if USE(CF)
    RetainPtr<CFStringRef> selectedCFString(AdoptCF, truncatedStringForLookupMenuItem(selectedString).createCFString());
    return formatLocalizedString(WEB_UI_STRING("Look Up “%@”", "Look Up context menu item with selected word"), selectedCFString.get());
#else
    return WEB_UI_STRING("Look Up “<selection>”", "Look Up context menu item with selected word").replace("<selection>", truncatedStringForLookupMenuItem(selectedString));
#endif
#endif
}

error info:

ContentType.cpp
CrossThreadCopier.cpp
DateComponents.cpp
DefaultLocalizationStrategy.cpp
DragData.cpp
DragImage.cpp
FileChooser.cpp
platform\DefaultLocalizationStrategy.cpp(327) : error C2001: newline in constant

platform\DefaultLocalizationStrategy.cpp(327) : fatal error C1057: unexpected en
d of file in macro expansion
FileStream.cpp
FileSystem.cpp
GeolocationService.cpp
KillRingNone.cpp
KURL.cpp
Language.cpp
Length.cpp
LinkHash.cpp
Logging.cpp
MIMETypeRegistry.cpp
RuntimeApplicationChecks.cpp
SchemeRegistry.cpp
ScrollableArea.cpp
ScrollAnimator.cpp
Scrollbar.cpp
ScrollbarThemeComposite.cpp
ScrollView.cpp
SharedBuffer.cpp
SharedBufferCRLFLineReader.cpp
ThreadGlobalData.cpp
ThreadTimers.cpp
Timer.cpp
UUID.cpp
Widget.cpp
PlatformStrategies.cpp
LocalizedStrings.cpp
Cursor.cpp
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

c:\Qt\Qt4.8.5>

EDIT:

Just updated the post link. I have put a wrong one.

EDIT2:

I tried Qt4.8.4 and QT4.8.3 also. All of them failed at the same place. Anybody can help me?

Community
  • 1
  • 1
5YrsLaterDBA
  • 31,368
  • 41
  • 126
  • 205
  • You should not need to do most of the hacks in that outdated blog. I have compiled Qt4.X on Visual Studio 2012 dozens of times without most of that. 1. Install active state perl. 2. Open a visual studio 2012 command prompt (32 or 64 bit depending on if you want 32 or 64 bit apps). 3. set QMAKESPEC=win32-msvc2012 4 execute configure in the source folder with the options you want. 5. use nmake or jom to build. – drescherjm Oct 31 '13 at 17:46
  • Sorry, I have put a wrong link. The instruction I followed is almost the same as you said. set QMAKESPEC=win32-msvc2012 should be done on Windows environment variables. Am I right? – 5YrsLaterDBA Oct 31 '13 at 18:02
  • I do this in a batch file launched from the visual studio 2012 command prompt. This way I can build for more than 1 version of visual studio and also 32 / 64 bit. I do all of this in separate build trees. – drescherjm Oct 31 '13 at 18:04
  • Here is the exact configure line I used to build Qt-4.5.4 under Visual Studio 2012 in July of this year: "configure -debug-and-release -no-webkit -no-phonon -no-qt3support -no-accessibility -opensource -fast -no-incredibuild-xge -mp -no-dbus -platform win32-msvc2012". – drescherjm Nov 01 '13 at 17:31
  • Hmm. You are building webkit when I am not. Do you need that in your applications? – drescherjm Nov 01 '13 at 17:44

0 Answers0