Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2012 nmake using v110_xp toolset?

Is there a way to use v110_xp toolset (instead of default "v110") when compiling with "nmake" ?

I'm trying to compile a Qt5 library for VisualStudio2012 and I need it to work on Windows XP machines too. I've managet to compile all Qt5 libraries using VS2012 with nmake, but even simple test applications fails to run on XP machines giving me the "The procedure entry point _except_handler4_common could not be located in the dynamic link library msvcrt.dll". (On Windows 7 machines my test application is working normally)

like image 373
Gediminas Avatar asked Apr 10 '13 14:04

Gediminas


4 Answers

  1. Edit Makefile.Debug or Makefile.Release file
  2. Add -D_USING_V110_SDK71_ to DEFINES

Example:

DEFINES = -D_USING_V110_SDK71_ -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG

Good luck!

like image 92
Дамян Фолкь Avatar answered Oct 21 '22 16:10

Дамян Фолкь


Information that I was looking for can be found here: http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx (in "Targeting from the Command Line")

like image 22
Gediminas Avatar answered Oct 21 '22 15:10

Gediminas


It is easier to edit mkspecs\win32-msvc2012\qmake.conf before you run configure. Edit the DEFINES += line and add the following:

WIN32 _USING_V110_SDK71_

You will have to stash and pop this change whenever you pull.

like image 30
SteveS Avatar answered Oct 21 '22 16:10

SteveS


nmake /E CC="cl /D_USING_V110_SDK71_ /D_WIN32_WINNT=0x0501" /f Makefile.vc

It is much easier when it is difficult to touch the make file.

like image 2
zzy Avatar answered Oct 21 '22 15:10

zzy