2

I need to build my C++ projects in two environments:

  • Visual Studio 2015 (VS2015) installed on Windows 10 x64

  • Visual Studio 2002 (VS2002) installed on Windows XP

Now every time I need to trigger to build my projects twice on 2 PC and this way is not sufficient for me.

I do some research before and someone suggest to install multiple compiler in one PC, but the problem is that VS2002 is too old to be installed on Windows 10 x64.

I am looking for any method or software tool that I can trigger the build once then I can build my projects on both VS2015 and VS2002 (e.g. if I can install both VS2015 and VS2002 in one PC, I can write a simple batch file to build my project in both compiler).

Chanh
  • 21
  • 1
  • Install cygwin and use ssh to trigger the build on the other machine or in a vm. – Retired Ninja May 13 '19 at 04:24
  • Such tool is `cmake 3.5`. https://cmake.org/cmake/help/v3.5/generator/Visual%20Studio%207.html – 273K May 13 '19 at 04:25
  • May I ask why? Is this a job requirement? XP is no longer supported (in any capacity, I think) and if you are using Windows 10 you might as well upgrade to Visual Studio 2019. – Casey May 13 '19 at 04:27
  • 2
    @Casey Yes. according to https://support.microsoft.com/en-us/lifecycle/search/14086, XP based Windows Embedded POSReady 2009 terminals get updates until April 9, 2019 (which is now in the past) – Jerry Jeremiah May 13 '19 at 04:51
  • @RetiredNinja Yes, using SSH is one option for me, but the set up may a bit complex, so I try to see if I have any other idea. – Chanh May 14 '19 at 00:45
  • @S.M. I check the cmake, it still need the VC++ compiler to be installed. – Chanh May 14 '19 at 00:46
  • It seems you are not experienced in using `cmake`. It's a pity, `cmake` would help you. – 273K May 14 '19 at 02:24
  • I don't see how cmake would help. It sounds like the solutions are already built and the problem is running the old compiler. You could use a VM for that. – Retired Ninja May 14 '19 at 02:50

1 Answers1

0

EDIT:

This answer is outdated because of clarification that the software is installed on two physically different machines.


If you have both VS .NET 2002 and VS2015 installed then you already have two compilers installed and they will be installed in two different places. You then should just be able to write a batch file to call each version of cl.exe (making sure the paths are absolute) and compile/link/build each project.

Casey
  • 10,297
  • 11
  • 59
  • 88