[WORDAROUND] Spaces in paths. Error LNK1181: cannot open input file 'Corporation/GVDB.obj'

error LNK1181: cannot open input file ‘Corporation/GVDB.obj’ C:\ProgramData\NVIDIA Corporation\GVDB SDK 1.0\build\gvdb_library\LINK libgvdb

Need more information than this.

(VS version? Cmake version? Win install or github? Which sample? Rest of console output?)

Thank you,
Rama

Win10-x64, VS2013, cmake3.7.0, CUDA8.0, Win install GVDB; Nvidia Quadro M4000,
When build the gvdb_library (either debug or release both the same ).

On the first time,the error is :

“Error C2664: ‘CUresult cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr *,size_t *,CUgraphicsResource)’: cannot convert argument 2 from ‘uint64 *’ to ‘size_t *’
C:\ProgramData\NVIDIA Corporation\GVDB SDK 1.0\source\gvdb_library\src\gvdb_volume_gvdb.cpp 2859”

The 2859th line:

cudaCheck(cuGraphicsResourceGetMappedPointer(&mRenderBuf[chan].gpu, &mRenderBuf[chan].size, mRenderBuf[chan].grsc), “cuGraphicsResourceGetMappedPointer”, “ResizeDepthBuf” );

When I add (size_t *) before &mRenderBuf[chan].size, the error changes into:
error LNK1181: cannot open input file ‘Corporation/GVDB.obj’ C:\ProgramData\NVIDIA Corporation\GVDB SDK 1.0\build\gvdb_library\LINK libgvdb

Thank you, Rama.

I am using Win10-x64, cmake 3.8.0, CUDA 8.0, Win installer.
Have tested both VS2012 and VS2015, with a fresh gvdb win install, and do not see either issue.

The only thing I can think of is update to cmake 3.8.0, and be sure to clear your cache.

The first issue may be real, but I guess only on some compilers.
The correct fix is these three lines:

size_t sz;
cudaCheck(cuGraphicsResourceGetMappedPointer(&mRenderBuf[chan].gpu, &sz, mRenderBuf[chan].grsc), “cuGraphicsResourceGetMappedPointer”, “ResizeDepthBuf” );
mRenderBuf[chan].size = (uint64_t) sz;

The second error looks like an issue with spaces in path, but we have not seen any issues like that. Our cmakes were made to handle spaces in source path. Again, try cmake 3.8.0 first.
If still having issues, paste your cmake cons output here.

I am using cmake 3.8.0 (cleaned the installation cache already) and VS2015 (2013 is the same problem), and modify the 2859th line to three lines what you gave to me. Another error occurs after build:

Error LNK1104 cannot open file ‘Corporation/GVDB.obj’.

The cmake cons output is :

The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe – works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe – works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done

Processing Project libgvdb:
found sub-folder cmake
BASE_DIRECTORY = C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library
CMAKE_CURRENT_SOURCE_DIR = C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library
Found OpenGL: opengl32
Found GLEW: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/glew/include
found Glew source code. Using it instead of library
Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 (found version “8.0”)
–> Using package CUDA (ver 8.0)
–> NOTE: OPENVDB is not enabled. Enable with the USE_OPENVDB option.
Located CUDA kernels: kernels/cuda_gvdb_copydata.cu;kernels/cuda_gvdb_module.cu;kernels/cuda_gvdb.cuh;kernels/cuda_gvdb_dda.cuh;kernels/cuda_gvdb_geom.cuh;kernels/cuda_gvdb_nodes.cuh;kernels/cuda_gvdb_operators.cuh;kernels/cuda_gvdb_particles.cuh;kernels/cuda_gvdb_raycast.cuh;kernels/cuda_gvdb_scene.cuh;kernels/cuda_math.cuh
NVCC Options: -arch=compute_30 -code=sm_30 --ptxas-options=-v -O3 --use_fast_math --maxrregcount=64
NVCC Include: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels
NVCC Compile: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/nvcc.exe --machine=32 --ptx -arch=compute_30 -code=sm_30 --ptxas-options=-v -O3 --use_fast_math --maxrregcount=64 kernels/cuda_gvdb_copydata.cu -I"C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels" -o C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/(Configuration)/cuda_gvdb_copydata.ptx WORKING_DIRECTORY C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library NVCC Compile: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin/nvcc.exe --machine=32 --ptx -arch=compute_30 -code=sm_30 --ptxas-options=-v -O3 --use_fast_math --maxrregcount=64 kernels/cuda_gvdb_module.cu -I"C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels" -o C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/(Configuration)/cuda_gvdb_module.ptx WORKING_DIRECTORY C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library
Build: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library
Lib: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib
Inc: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Share: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib
Libraries used:
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/Win32/cuda.lib
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/Win32/cudart.lib
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/app_perf.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_allocator.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_camera.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_model.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_node.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_render.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_scene.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_types.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_vec.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_volume_3D.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_volume_base.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/gvdb_volume_gvdb.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/loader_OBJReader.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/loader_ObjarReader.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/loader_Parser.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/src/string_helper.h -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_gvdb.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_gvdb_dda.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_gvdb_geom.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_gvdb_nodes.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_gvdb_operators.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_gvdb_particles.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_gvdb_raycast.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_gvdb_scene.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/kernels/cuda_math.cuh -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/include
Import Library: /implib:C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/(Configuration)/libgvdb.lib Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/(Configuration)/libgvdb.dll -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/(Configuration)/libgvdb.lib -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib Shaders used: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/shaders/voxelize.frag.glsl;C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/shaders/voxelize.geom.glsl;C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/shaders/voxelize.vert.glsl Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/shaders/voxelize.frag.glsl -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/shaders/voxelize.geom.glsl -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/source/gvdb_library/shaders/voxelize.vert.glsl -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib PTX files: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/(Configuration)/cuda_gvdb_copydata.ptx;C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/(Configuration)/cuda_gvdb_module.ptx Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/(Configuration)/cuda_gvdb_copydata.ptx -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib
Install: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/build/gvdb_library/$(Configuration)/cuda_gvdb_module.ptx -> C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0/lib

GVDB INSTALL PATH: C:/ProgramData/NVIDIA Corporation/GVDB SDK 1.0
GVDB will be installed to this path post-build (win32) or during make install (linux)
Configuring done
Generating done

In VS2015, goto Tools->Options->Projects and Solutions->Build and Run…
Set MSBuild project output verbosity: Detailed or Diagnostic
Set MSBuild project build log verbosity: Detailed or Diagnostic

Right click on project ‘libgvdb’ in Solution Explorer, goto Project Only -> Rebuild only libgvdb

Paste the detailed console output here.

Dear Rama,
First, I keep the original 2859th line, and followed your direction to set VS. The output is attached.
1.txt (121 KB)

Then I used the new 3 lines instead. The output is attached.
2.txt (150 KB)

123

I movedd the GVDB folder into Other location, and then changed the name from “GVDB SKD 1.0” to “GVDB”, then the first build passed.

It’s not clear why spaces-in-path would work on some systems and not others. Especially since we are using the same Win ver, Cmake ver, CUDA ver. I am unable to reproduce this issue. For now, workaround is to copy to a non-spaced source path.

I am having the same issue. Win7, cmake 3.1.1, CUDA 7.5, OptiX 4.0.2, VS2012.