How to put "timer" CUDA functions into a DLL Problem calling timer functions from DLL

Hi,

 I need to put the content of my *.cu and *_kernel.cu files into a DLL. 

I work with VS2005 and the QT plug-in to keep my applications multi-plateform

I create a QT library project to produce my DLL and I use a QLibrary object to retrieve my functions:

Qlibrary myLib = new QLibrary(“mycuda.dll”);
myLib->Load();

MyFunction myfunction = myLib->resolve(Wrap_MyFunction);

                                                      ***

Using the “export” syntax…

extern “C” void MyCutDeviceInit();
extern “C” MY_EXPORT void Wrap_MyCutDeviceInit()
{
MyCutDeviceInit(); // this function calls the innermost CUT_DEVICE_INIT();
}

… I’m able to export all the functions I need except for the ‘timer’ functions
( and a few others like CUT_EXIT() )

Someone could please tell me why ? Since I can export ALL my computing functions (no matter the number and the kind of parameters, no matter how complicated they are) I guess it is just impossible to call timer functions from an ‘outdoor’ DLL.

I’m I right ? Any other idea… ? :whistling:

Many thanks

                                                                                     David

Hi,

Timer functions are called from “cutil32.dll” at run-time. Have you tried to put “cutil32.dll” inside the folder you are working in? (This library should be in the same folder with the executable file). I think this should solve your problem.

Thank you very much.

You are right ! :thumbup:

Putting cutil32.dll close to the executable (which calls DLL) everything works fine.
I can export timer function as well.