I'm using Microsoft Visual C++ 2008 Express Edition and I have to work with CUDA technology. I've understood how to work with it creating console applications. But I have no idea how to make it working in win32 applications with forms (dialogs, buttons, labels, etc.) Any idea?
+1
A:
Exactly the same way.
Having CUDA in your project does not depend on whether its a console application or a windows application.
Create a new project, right click on it and select "Custom Build Rules..."
In the dialog that opened, locate the "CUDA Build rule" in your SDK directory.
Then, you just add the .cu files to your project and setup the "Cude Build Rule" to build them using the "Tool" option under "Generel" in the properties of the file.
shoosh
2009-12-12 12:03:32
I got it, thanks! But I still have a question. When I add the .cu file to my frame-based project, how to make it work together with my form header file (for example "Form1.h")? Because I have there all my button-pressing events declarations, another dialog-objects declaratons, etc. Sorry for lamer's questions...
KyberProtagonistes
2009-12-12 12:29:17
Actually I get next error when I'm trying to act the way you recommended: fatal error lnk1313 ijw native module detected cannot link with pure modules
KyberProtagonistes
2009-12-12 13:20:41
A:
It looks like you're mixing .net with native, there are a few posts on related subjects such as on stackoverflow and on the NVIDIA forums. One simple solution would be to interface to the CUDA code through a DLL.
Tom
2009-12-12 15:16:38
I don't use dotnet platform. I use C++ language on MVC++2008EE...
KyberProtagonistes
2009-12-12 15:32:25
I think you removed the original error from your post? If I remember correctly it indicated you were mixing managed (I said .net but C++/CLI is managed too) and unmanaged (native) code. The links I posted talk more about that topic.
Tom
2009-12-13 10:11:54