progressbar
progressbar copied to clipboard
Undefined symbols for architecture x86_64 Error
I'm getting the below error when compiling in my project when statically linking with the progressbar lib:
Undefined symbols for architecture x86_64:
"_tgetent", referenced from:
_get_screen_width in libprogressbar.a(progressbar.o)
"_tgetnum", referenced from:
_get_screen_width in libprogressbar.a(progressbar.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] Error 1
I'm on a 2019 macbook running Catalina 10.15.6.
I Tried to use the -m64 arg when building my code with the progressbar lib but havent yet tried this flag when building the progressbar project directly.
Hi @joegasewicz! I have faced the same problem on macOS Catalina 10.15.7. If you use CMakeLists.txt that doesn't include specifications about curses, try adding the lines below. It works fine on my Mac.
set(CURSES_NEED_NCURSES TRUE)
find_package(Curses)
include_directories(${CURSES_INCLUDE_DIRS})
Thanks @contrachako ill try it tonight after work, cheers!