c++ - 在 Mac OS 上编译 Halide 的 camera_pipe 应用程序时出现问题

标签 c++ x86-64 halide

我是 Halide 的新手,刚刚从源代码成功编译了 Halide。我想从源代码 (https://github.com/halide/Halide/tree/master/apps/camera_pipe) 中试用 camera_pipe 应用程序,但出现以下错误,我不确定如何调试/修复它。提前感谢您的任何建议或帮助!

我的系统运行的是 Mac OS Sierrar (10.12.3)

这是 Makefile 运行的命令:

c++ -std=c++11 -I ../../include/ -I ../../tools/ -I ../../apps/support/ -g -fno-rtti camera_pipe_generator.cpp ../../lib/libHalide.a ../../tools/GenGen.cpp -o bin/camera_pipe_exec -L/usr/local/lib -ldl -lpthread -lz

这是我得到的错误输出:

Undefined symbols for architecture x86_64:
      "_del_curterm", referenced from:
          llvm::sys::Process::FileDescriptorHasColors(int) in libHalide.a(llvm_460_Process.cpp.o)
      "_set_curterm", referenced from:
          llvm::sys::Process::FileDescriptorHasColors(int) in libHalide.a(llvm_460_Process.cpp.o)
      "_setupterm", referenced from:
          llvm::sys::Process::FileDescriptorHasColors(int) in libHalide.a(llvm_460_Process.cpp.o)
      "_tigetnum", referenced from:
          llvm::sys::Process::FileDescriptorHasColors(int) in libHalide.a(llvm_460_Process.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: *** [bin/camera_pipe_exec] Error 1

最佳答案

看起来你的 llvm 依赖于 terminfo,但默认情况下相机管道不链接它。尝试将 -ltinfo 与 -lpthread -lz 等一起添加到 makefile 中。

关于c++ - 在 Mac OS 上编译 Halide 的 camera_pipe 应用程序时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42844055/

相关文章:

c++ - 如何预分配(保留)priority_queue<vector>?

c++ - 如何在顶部 2D 小 map 上显示以 3D 视角呈现的平面世界的可见部分?

c++ - 无法计算图像中的 alpha

c++ - VS-2019 的编译错误

linux - Perf 启动开销 : Why does a simple static executable which performs MOV + SYS_exit have so many stalled cycles (and instructions)?

java - 为什么 (n mod const) 比 (const mod n) 快?

x86 - 是否可以设置在 cpu 写入特定地址时中断的中断?

c++ - Halide:如何处理(重叠) block 中的图像?

halide - Halide 索引是行优先、列优先还是混合?

c++ - Boost::convex_hull 分散的二维点在 STL 容器中