Zfields changed the title Mac (clang) linker error: Undefined symbols for architecture x8664 v2.1.2 v2.1.2 Mac (clang) linker error: Undefined symbols for architecture x8664 Feb 28, 2018 This comment has been minimized. Jun 26, 2018 Thanks. Actually is not system but one of the Cmake command options. As suggested by 'ngladitz' in the 'cmake' channel (irc.freenode.net) I lauched the compile phase with make VERBOSE=1 command and noticed that the compiler used by Make was g-7 (that, in my case, is located in the Homebrew packages installation path) instead of the default Mac OS X C and C compilers that are.
What is going on here? I can't seem to build with gcc. How can I fix this.
mbp-mbp 09:24:18 ~/bin $ gcc connect.c -o connect
Undefined symbols for architecture x86_64:
'_res_9_init', referenced from:
_switch_ns in ccTLCqYq.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
mbp-mbp 09:26:14 ~/bin $ gcc -v
Using built-in specs. https://gigtree281.weebly.com/blog/formatting-for-mac-and-pc.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.8.3/libexec/gcc/x86_64-apple-darwin1 3.2.0/4.8.3/lto-wrapper
Target: x86_64-apple-darwin13.2.0
Configured with: ./configure --build=x86_64-apple-darwin13.2.0 --prefix=/usr/local/Cellar/gcc/4.8.3 --enable-languages=c,c++,objc,obj-c++,fortran --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.8.3 (GCC)
5.1.1 xcode nad command line tools
Undefined Symbols For Architecture X86_64 Mac Os X
OSX 10.9.3
Cheers
Posted on
Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Mac eyeshadow for brown eyes. 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
Commentscommented Sep 19, 2018
commented Sep 19, 2018Undefined Symbols For Architecture X86_64 Mac Make
Undefined Symbols For Architecture X86_64 Osx
closed this Sep 19, 2018
Undefined Symbols For Architecture X86_64 Mac Qt
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |