Hello guys, I’ve been wanting to try CUDA for a while but never got do it. Now that I’m finally here I’ve been trying to get the cross compiling to work but I always met barricades which stopped me from advancing. I work in VISUAL STUDIO 2008 btw.
Alright here is the steps I’ve been doing it:
1: Install Driver (190.xx), 64 bit toolkit and 64bit SDK.
2: I opened up the sample projects from the SDK and compiled succesfully the first try in x64 mode.
3: Now time for 32 bit compiling. I choose win32 and compile. I get errors immidiately.
What I did at this step is to read on the forums about what was causing it. I did those steps below to fix it:
step 1: add --machine 32 to extras in properties at the CUDA Build RUle 2.3.0
step 2: I Right click on my computer, got to systemsettings and enviroment variables. I added my own version of them such as CUDA_LIB_PATH32 and CUDA_BIN_PATH32 and kept the regular ones which were pointing to the 64 bit folders. My ones now point to 32 bit folders. I saw this suggested somewhere but I didn’t know how this would help me though.
Step 3: I changed the path in the linker so it points to CUDA_LIB_PATH32 instead of CUDA_LIB_PATH. Hence, 32 bit version.
4: Now I tried building it and it told me missing cutil32d.lib. Time to research on the forums again and then people said that I had to rebuild the cutil solution inside the nvidia folder in win32 debug mode. I did it and tadaa, got the lib files in 32bit.
5: Now I build in 32bit again and it compiles and run, but exists with “can’t find cudart.dll”. It also shows in visual studio this error code: 0xc000007b
Now as you guys see I normally research about the errors before posting. I found a thread about this error message at page 2 where people say declare enviroment variables ( which I did already in step 3 part 2 ). But I can’t get it to find the right cudart.dll file. If I copy the 32 bit one from C:\Cuda\bin to the project folder, it all works. But I want it to work without doing that, and I saw some people in the forums that got it to work with those enviroment path variables, but I have no ideas how to use my path variable so it detects the correct dll, in this case the path is declared as CUDA_BIN_PATH32.
I saw in the documentation that cross compiling is possible with version CUDA 2.3 but oh boy I never thought it would take this much time to actually get it to work V_V"
If someone could help me out to get this fixed so it finds the correct DLL, you would have my thanks.