CUDA 9 unsupported error with Visual Studio 2017

Mikhail Genkin

I've recently updated my VS 2017 and now I cannot even build a default CUDA project (the one with the vector addition).

I suspect that this is due to the following error:

Severity    Code    Description Project File    Line    Suppression State
Error   C1189   #error:  -- unsupported Microsoft Visual Studio version! 
 Only the versions 2012, 2013, 2015 and 2017 are supported! ver2    
c:\program files\nvidia gpu computing 
toolkit\cuda\v9.0\include\crt\host_config.h 133 

The other errors are irrelevant and will disappear once I fix this one. Note, that I am able to build and run simpleCUFFT from CUDA samples.

Before the update I was able to build the default CUDA project but I was not able to build the CUDA Sample project. I've updated my VS2017 using VS installer and installed CUDA SDK 10.0.15063.0. Attached is the screenshotscreenshot with the installed components.

Please let me know if any additional information is required. I am aware of the following topic and since I am using the latest CUDA toolkit, I don't need to make changes in host_config.h.

Thanks, Mikhail

Edit: My VS version (as displayed in VS installer) is 15.5.0 My nvcc version is release 9.0, V9.0.176

Edit2: I've tryied to change host_config.h line 133 to:

  #if _MSC_VER < 1600 || _MSC_VER > 1912

This error does not show up anymore, however, a bunch of errors "expression must have a constant value" show up in the file type_trails. I have no clue how to fix it.

Mikhail Genkin

After some painful time, I was able to solve the problem. Here is the answer for those who have a similar problem:

1) Make sure that you have VC++ 2015.3 v140 toolset (can be installed either from web or Visual Studio installer)

2) In the project properties (general) -> Platform toolset choose Visual Studio 2015 (v140).

Edit (5/21/2018): I've just updated Visual studio 2017 to the latest version 15.7.1. From now on, I can choose VS 2017 v141 toolset and it works fine.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Visual Studio 2017でのCUDAの使用

分類Dev

Visual Studio 2017 debug error: "Frame not in module"

分類Dev

Visual Studio 2017 "error" prevents editing of form

分類Dev

CUDA 7.5 installation: Unsupported compiler error

分類Dev

Visual Studio 2017 crash

分類Dev

Visual studio 2017 unable to update, installer uninstall with error log

分類Dev

Manually update Visual Studio 2017

分類Dev

AnkhSVN crash in Visual Studio 2017

分類Dev

Visual Studio 2017 - python tool

分類Dev

Visual Studio 2017 build agent fails to build with error cs0400

分類Dev

Asp.Net Core 2 Web API shows HTTP 404 error on Visual Studio 2017, Windows 10

分類Dev

Visual Studio 2017: Error when compiling project in MinimumRecommendedRules.ruleset file

分類Dev

Downgrade Visual Studio 2019 back to Visual Studio 2017

分類Dev

Visual Studio 2017 Upgrade from Community to Enterprise

分類Dev

Create Ribbon in WPF App with with Visual Studio 2017

分類Dev

Python Tools Visual Studio 2017 RC

分類Dev

Visual Studio 2015/2017のTSLint?

分類Dev

Visual Studio 2017 TypeScript compilation errors

分類Dev

F#、Visual Studio 2017、dotnet new

分類Dev

Visual Studio 2017 Reference Manager is empty

分類Dev

Solution for developing in Windows Silverlight in Visual Studio 2017?

分類Dev

How to disable AVX in Visual Studio 2017 15.5?

分類Dev

Usage of Fody/Costura and Obfuscar in Visual Studio 2017

分類Dev

Visual Studio 2017 - Not Able to see Publish Profiles

分類Dev

Open file in existing instance of Visual Studio 2017

分類Dev

How to upgrade NuGet with Visual Studio 2017?

分類Dev

Visual studio 2017 reorders includes without asking

分類Dev

Visual Studio 2017 TypeScript compilation errors

分類Dev

Visual Studio 2017 File icons broken

Related 関連記事

  1. 1

    Visual Studio 2017でのCUDAの使用

  2. 2

    Visual Studio 2017 debug error: "Frame not in module"

  3. 3

    Visual Studio 2017 "error" prevents editing of form

  4. 4

    CUDA 7.5 installation: Unsupported compiler error

  5. 5

    Visual Studio 2017 crash

  6. 6

    Visual studio 2017 unable to update, installer uninstall with error log

  7. 7

    Manually update Visual Studio 2017

  8. 8

    AnkhSVN crash in Visual Studio 2017

  9. 9

    Visual Studio 2017 - python tool

  10. 10

    Visual Studio 2017 build agent fails to build with error cs0400

  11. 11

    Asp.Net Core 2 Web API shows HTTP 404 error on Visual Studio 2017, Windows 10

  12. 12

    Visual Studio 2017: Error when compiling project in MinimumRecommendedRules.ruleset file

  13. 13

    Downgrade Visual Studio 2019 back to Visual Studio 2017

  14. 14

    Visual Studio 2017 Upgrade from Community to Enterprise

  15. 15

    Create Ribbon in WPF App with with Visual Studio 2017

  16. 16

    Python Tools Visual Studio 2017 RC

  17. 17

    Visual Studio 2015/2017のTSLint?

  18. 18

    Visual Studio 2017 TypeScript compilation errors

  19. 19

    F#、Visual Studio 2017、dotnet new

  20. 20

    Visual Studio 2017 Reference Manager is empty

  21. 21

    Solution for developing in Windows Silverlight in Visual Studio 2017?

  22. 22

    How to disable AVX in Visual Studio 2017 15.5?

  23. 23

    Usage of Fody/Costura and Obfuscar in Visual Studio 2017

  24. 24

    Visual Studio 2017 - Not Able to see Publish Profiles

  25. 25

    Open file in existing instance of Visual Studio 2017

  26. 26

    How to upgrade NuGet with Visual Studio 2017?

  27. 27

    Visual studio 2017 reorders includes without asking

  28. 28

    Visual Studio 2017 TypeScript compilation errors

  29. 29

    Visual Studio 2017 File icons broken

ホットタグ

アーカイブ