aj3423
aj3423

Reputation: 2541

cuda vs2013 v120xp compile error

I'm using VS2013(update 4) + CUDA 6.5 + win7-32bit

My CUDA program compiles fine without the v120xp option, I need it support winXP. But there're lots of compile error with v120xp specified.

To reproduce the problem:

  1. Create a new project with VS2013's CUDA wizard
  2. Change the Platform Toolset to Visual Studio 2013 - Windows XP (v120_xp)
  3. Compile

The compile error looks like:

1>G:\vs2013\VC\include\yvals.h(666): error : expected a ";"
1>G:\vs2013\VC\include\yvals.h(667): error : expected a ";"
1>G:\vs2013\VC\include\exception(460): error : "explicit" is not allowed
1>  kernel.cu

I also compiled the program with CMake, everything is ok(with the v120_xp). Though I write code with CMake, my company uses VS2013, so I need to generate a VS2013 project for my colleagues.

How to make it compile? Thanks.

Upvotes: 2

Views: 364

Answers (1)

aj3423
aj3423

Reputation: 2541

Finally, a workaround for this:

Don't change the Platform Toolset, leave it as v120, and add /SUBSYSTEM:WINDOWS,5.01 or /SUBSYSTEM:CONSOLE,5.01 manually in Command Line setting

Upvotes: 2

Related Questions