Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Using CUDA Library in Qt Project

$
0
0
Hello all, I’m trying to get a simple Qt Widget project to use a CUDA library that I’ve compiled. I’ve added the following to the .pro file: LIBS += -L$$PWD/ -lCUDA_lib   INCLUDEPATH += $$PWD/ DEPENDPATH += $$PWD/ The library consists of the basic CUDA VS2012 template (just a kernel.cu file implementing array addition), but when I call the function to start this: int a [5] = {1, 2, 3, 4, 5}; int b [5] = {6, 7, 8, 9, 10}; int c [5] = {}; addWithCuda(c, a, b, 5); I get a “C3861: ‘addWithCuda’: identifier not found” error. I assume I have to use a header file here, but I am unsure how. I have the .lib file copied to the Qt project’s base directory, but should I instead reference the original in the .pro file? Any help would be greatly appreciated. Thanks. Phillip

Viewing all articles
Browse latest Browse all 2113

Trending Articles