0
votes

I am working on computer vision problem on GPU and I am trying to do it with openCV. I completed the installation using Cmake and then build the project using visual studio 2008. Then I wrote a short program in Visual studio 2008 to test the openCV installation and then I build the project. The project is getting build perfectly well but when I am trying to run the program (ctrl+F5) a message is occurring in the screen which prompts

"The program can't start because cudart32_42_9.dll is missing from your computer. Try reinstalling the program to fix the problem."

What is this error about and how can I run the openCV with cuda programs correctly without any sort of error? I have a deadline of project and I cannot get this working for last 4 days. It is so frustrating. Now everything got installed correctly but ultimately this one thing is making me crazy. I would be really glad and thankful if someone could help me out through this problem and could guide me to run the openCV with cuda correctly.Thanks for all your help.

1
are you running 32 or 64 bit windows? You seem to have linked your application against the 32 bit cuda 4.2 runtime. See if you can find cudart32_42_9.dll (perhaps using windows search) on your computer and copy it to the same location as the openCV executable you are trying to run.Robert Crovella
I am running 64 bit windows.duttasankha
Did you copy the file? have you installed the cuda toolkit and sdk ?Robert Crovella
I did found the cudart32_42_9.dll and you suggested me to add it to the openCV executable location. Can you be more explicit about the location like which folder. One more thing I would like to mention that cudart32_42_9.dll is present in the NVdia SDK.2\C\Commom\bin and I already included the path in the tools->options->projects and solutions->VC++directories->executable files(from show directories for dropdown menu). Is it the right process? Anyways it would be helpful if you could mention openCV executable locationduttasankha
You are compiling an application under MS VS 2008, correct? When you compile an application, it creates a .exe file (usually) called an executable. This .exe file that you built will be in the MS VS project directory for the project you are building. Locate the .exe file that is getting built when you do your build in MS VS. Then copy the cudart dll file to that location. You're getting into this bind because you have 64 bit windows but are linking against 32 bit cudart. The change you made in the VC++directories does not affect the dll load path for the executable.Robert Crovella

1 Answers

2
votes

The problem can be fixed by locating the cudard32_42_9.dll file (both cudart32 and cudart64 files will be included with the SDK or samples, however only one will come with the cuda toolkit, depending on whether you loaded the 32 or 64 bit toolkit) and then copying that file to the same location as the program you are trying to run. I believe the reason for this difficulty is that with 64 bit windows, and installing the 64 bit tookit, only the 64bit cudart version gets installed to the appropriate dll load path for windows. If you build an application and link it against the 32 bit cudart library, the appropriate 32 bit cudart dll will not automatically be on the correct load path. But the location of the executable is always on the dll load path for that executable, so the cudart dll file can be placed there as a workaround.