-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error C++11 CUDA #818
Comments
Adding the following line to the
|
related: code-iai/iai_kinect2#381 |
@caselitz Hi.I have the same error. You say " in the main CMakeLists.txt , adding a line code",which CMakeLists.txt ?Where is the path of the CMakeLists.txt? Thanks |
Hi @InstantWindy, I saw that your issue is actually this one and had a quick look. My guess is that |
I inserted the line set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11") in the top level CMakeLists.txt of the colmap project. but it didn't work. |
@caselitz I meet a simlar problem, and I solve it with the solution introduced by @InstantWindy. Specifically, I insert the line "set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++14")" (not c++11) in the line 197. But my error is a little different from yours. My first error message is: /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h(436): error: identifier "nullptr" is undefined. And this is the fifth message in your error. |
Hi,I added the command But still got errors at the end of make (about 96%) [ 96%] Building NVCC (Device) object src/CMakeFiles/colmap_cuda.dir/mvs/colmap_cuda_generated_patch_match_cuda.cu.o /usr/include/c++/4.9/bits/stl_algo.h(3587): error: expression must have a constant value /usr/include/c++/4.9/bits/stl_algo.h(3587): error: expression must have a constant value 1 error detected in the compilation of "/tmp/tmpxft_000169e7_00000000-5_gpu_mat_prng.cpp4.ii". make[2]: *** [src/CMakeFiles/colmap_cuda.dir/mvs/colmap_cuda_generated_gpu_mat_prng.cu.o] Error 1 make[2]: *** [src/CMakeFiles/colmap_cuda.dir/mvs/colmap_cuda_generated_gpu_mat_ref_image.cu.o] Error 1 1 error detected in the compilation of "/tmp/tmpxft_000169df_00000000-5_patch_match_cuda.cpp4.ii". make[2]: *** [src/CMakeFiles/colmap_cuda.dir/mvs/colmap_cuda_generated_patch_match_cuda.cu.o] Error 1 Did you have this problem? Please tell me if you have any suggestions. Thank you so much. |
Hi,I added the command set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11") in the row of 197 But still got errors at the end of make (about 96%), as detailed on this page. Your any suggestion is much appreciated. Thank you. |
works for me, thanks |
@laoyandujiang your proposed solution worked for me, was stuck for so many time.. thank you!! |
Hi,
I have problems with compiling libfreenect2 using
when I set ENABLE_CXX11 to ON. I get the following errors:
The text was updated successfully, but these errors were encountered: