Skip to content
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

Undefined symbols for architecture x86_64 Error #33

Open
joegasewicz opened this issue Sep 9, 2020 · 2 comments
Open

Undefined symbols for architecture x86_64 Error #33

joegasewicz opened this issue Sep 9, 2020 · 2 comments

Comments

@joegasewicz
Copy link

joegasewicz commented Sep 9, 2020

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.

@contrachako
Copy link

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

@joegasewicz
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants