CUDA and MFC included project files

Hello,

i have added a simple cuda program to an existing project using mfc,
the debug version can link and run.
but the emudebug version can’t link

You can find all the project files, and run it.
you can compile and execute it in emudebug mode, BUT not with
MFC functions, because of a linker error.

There are explanations how to add a cuda program in an existing
MFC project.

François.
test.zip (492 KB)

I think the CUDA team should deploy the cuda’s .lib using all the C CRT modes ( MD, MT, MTD, etc )… if not, the users will have problems like this one… The situation is terrible using MFC or .NET CLI and STL.net.

What is the exact linker error you’re getting? I remember getting errors while doing a MFC test program, and if I recall correctly they’re due to the CUDA library using one version of the C run-time library, and MFC using a different version.

Try changing the project’s linker settings:
Ignore Specific Library -> LIBCMTD.lib