nmoehrle / mvs-texturing

Algorithm to texture 3D reconstructions from multi-view stereo images
Other
931 stars 328 forks source link

Compiler cannot find header files for included libs omp and tbb #147

Closed aputch closed 4 years ago

aputch commented 4 years ago

Hello, I'm trying to compile mvs-texturing on MacOS Catalina and have the all dependencies installed with homebrew. When I follow the guide on the project website I get a 'omp.h' file not found #include <omp.h> ^~~~~~~ 1 error generated. make[2]: *** [libs/tex/CMakeFiles/tex.dir/calculate_data_costs.cpp.o] Error 1 make[1]: *** [libs/tex/CMakeFiles/tex.dir/all] Error 2 make: *** [all] Error 2

I found some cmake documentation that suggested a new way to target OpenMP and tried updating CMakeLists.txt which seemed to fix my #include omp.h problems but I was still getting #include tbb.h errors so I followed this guide and set the tbb include / lib paths when calling cmake with this cmake -DTBB_INCLUDE_DIR=/usr/local/include -DTBB_LIBRARY=/usr/local/lib .

Unfortunately, I'm still getting this error stack and am not sure what else to try! Hoping someone can help.

`In file included from /Users/Andy/documents/workspace/textureTest/texrecon/apps/texrecon/texrecon.cpp:13: /usr/local/include/tbb/task_scheduler_init.h:21:9: warning: TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual. [-W#pragma-messages]

pragma message("TBB Warning: tbb/task_scheduler_init.h is deprecated. For details, please se...

^

1 warning generated. [100%] Linking CXX executable texrecon Undefined symbols for architecture x86_64: "_omp_set_dynamic", referenced from: _main in texrecon.cpp.o "_omp_set_num_threads", referenced from: _main in texrecon.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [apps/texrecon/texrecon] Error 1 make[1]: [apps/texrecon/CMakeFiles/texrecon.dir/all] Error 2 make: *** [all] Error 2`

pavan4 commented 4 years ago

@aputch fixed these in https://github.com/nmoehrle/mvs-texturing/pull/148

@nmoehrle please merge the PR if you get a chance :)

aputch commented 4 years ago

Fantastic, thank you @pavan4!