progressbar icon indicating copy to clipboard operation
progressbar copied to clipboard

Undefined symbols for architecture x86_64 Error

Open joegasewicz opened this issue 5 years ago • 2 comments

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.

joegasewicz avatar Sep 09 '20 11:09 joegasewicz

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})

contrachako avatar Jan 20 '21 14:01 contrachako

Thanks @contrachako ill try it tonight after work, cheers!

joegasewicz avatar Jan 20 '21 16:01 joegasewicz