I’m doing research work this summer which includes translating VB code to C++ code to be used on a C2050 with CUDA c.
I have the compiler working and can create/run CUDA applications, however recently I began writing up the forms for the GUI.
This is where problems arose. I used the windows forms option in VS2010 to create the necessary forms however it is riddled with errors.
This is code that is “generated” for the most part, and I have identical code running in an environment that does not use the CUDA compiler.
That leads me to believe that there is an issue between the forms in VS2010 and CUDA 3.2 however I have found next to nothing on the problem online or on this site. The most frustrating part is I do not get a real error, its little syntax errors on just about every line. Eventually it overloads with over 100 lines or errors and quits.
The exit code is as follows:
2> Error limit reached.
2> 100 errors detected in the compilation of "C:/Users/End-user/AppData/Local/Temp/tmpxft_00001228_00000000-3_module1.cpp1.ii".
2> Compilation terminated.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 3.2.targets(290,3): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" --use-local-env --cl-version 2008 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include" -G0 --keep-dir "Debug" -maxrregcount=32 --machine 32 --compile -D_NEXUS_DEBUG -g -Xcompiler "/EHsc /nologo /Od /Zi /MDd " -o "Debug\module1.cu.obj" "C:\Users\End-user\Documents\Visual Studio 2010\Projects\Conversion\Conversion\module1.cu"" exited with code 4.
2>
With just some general errors being:
2>(5): error : name must be a namespace name
2>(6): error : name followed by “::” must be a class or namespace name
2>(7): error : name followed by “::” must be a class or namespace name
2>(8): error : name followed by “::” must be a class or namespace name
2>(9): error : name followed by “::” must be a class or namespace name
2>(10): error : name followed by “::” must be a class or namespace name
2>(15): error : expected a declaration
It goes on for well over 100 errors but the code all works in non CUDA environments.
That snippet of errors comes from the following code:
#pragma once
#include "Form1.h"
namespace Conversion {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for Form2
/// </summary>
public ref class Form2 : public System::Windows::Forms::Form
{
public:
Form2(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
After looking around I found to change the suggestion to change “Common language runtime support” to /clr.
While this removed the errors before compilation it still has the same issues.
If this topic is in the wrong area I apologize.
Any suggestions or help would be appreciated.
Thank you.