Microsoft Visual Studio Not Linking My CUDA .obj Files Into My .lib?

This seems harder, maybe some more competent/experienced people will answer too...

Up vote 0 down vote favorite share g+ share fb share tw.

So, we recently upgraded our project to be using Microsoft Visual Studio 2010 and we are having some issues with our CUDA projects. I do have 2008 installed, and I am using the vc90 toolkit, and the files appear to be compiling (their associate . Obj files are created).

This is in the a project which creates a . Lib as its output. The .

Lib is then linked against in another project which produces linker errors because one of files in the library (Matrix. Obj) can't find one of the symbols that should be in CUDAMatrix.obj. I ran dumpbin /SYMBOLS on CUDAMatrix.

Obj, and the symbol is in there, is not UNDEF, and is External. I ran dumpbin on our . Lib, and the symbol does not appear to be inside it.

I turned up the verbosity of the build of the library and the list of . Obj files after: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\Lib. Exe Does not appear to contain CUDAMatrix.obj.

To sum up, how does the Visual Studio project know what . Obj files to stick into the . Lib that is being made?

I couldn't find the actual list anywhere, and the librarian submenu didn't seem to help. Or least conveniently, is there an external tool (similar to 'ar' on linux) that I can use to merge the . Obj it produced with the library?

I thought maybe the /MERGE switch on lib. Exe would do it, but I kept getting a . Dll not found error when I tried to run that from the command line.

P.S. The dumpbins also confirmed that both the . Lib and the . Objs were x86 targeted.

P.P.S. Adding them as "additional dependencies" in the librarian seems to work, but isn't there any good way to make this happen automatically? They are, after all, part of the project. Visual-studio-2010 linker cuda .

Obj . Lib link|improve this question edited Mar 17 '11 at 6:06 asked Mar 17 '11 at 5:49Chad Mourning796 38% accept rate.

Because VS2010 and VS2008 uses different build system, troubles may origin from that. I must say, I do not really fully understand the new build system. I created my files through trial-and-error + some help with the buildin VS2008->VS2010 build-rule converter (which is still buggy and does not support everything).

In my CUDA build rule file I have (CUDA. Targets) ... --compile -o "$(IntDir)%(OutputFile).cu. Obj" -cuda -o "$(IntDir)%(OutputFile).cu.

C" -gpu -o "$(IntDir)%(OutputFile). Gpu" -cubin -o "$(IntDir)%(OutputFile). Cubin" -ptx -o "$(IntDir)%(OutputFile).

Ptx" ... ... $(ComputeLinkInputsTargets); ComputeSDF_CUDAOutput; $(ComputeLibInputsTargets); ComputeSDF_CUDAOutput; $(IntDir)%(OutputFile).cu. Obj $(IntDir)%(OutputFile).cu. C $(IntDir)%(OutputFile).

Gpu $(IntDir)%(OutputFile). Cubin $(IntDir)%(OutputFile). Ptx I believe the one of the last nodes actually guides the subsequent linking stage to include the generated .

Obj file. Which one exactly? I don't know :) Hope it will help... somehow... good luck!

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions