Sep 08, 2009 Question: Q: 'Undefined symbols for architecture' when building Universal Binaries The build I'm doing works fine when specifying either i386 or x8664 or ppc.by itself., however whenever I try to combine the archs to make a UB, I get problems building libraries. I builded my app with xcode iOS8 under 32 bits architecture, it succeeded. When I builded it under 64 bits architecture (armv7, arm64), it failed with the following message: Undefined symbols for architecture x8664: 'OBJCCLASS$ATParams', referenced from: objc-class-ref in Tagger.o. Ld: symbol(s) not found for architecture x8664.
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.
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
OSX 10.9.3
Cheers
Posted on
Hi,
This is literally my first day trying to develop on a MAC.
I've spent the last several hours reading through posts for this error message here and on SO but have not been able to resolve this.
![]()
I'm running Yosemite 10.10.5
I have a fresh install of Xcode 7.2
I created my first ever project following this tutorial:
After creating the Single View Application I was able to run the simulator.
I then followed the rest of the steps on that page adding UI elements and then when I attempted to run the simulator got the error.
'Undefined symbols for architecture x86_64:
'_main', referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)'
Undefined Symbols For Architecture X86_64 Mac Clion
Most of the posts I read are for far more complex projects. I did try adding UIKit.framework to the 'Link Binary With Libraries' section of the project Build Phases but got the same error.
Undefined Symbols For Architecture X86_64 Mac Openssl
I tried reinstalling Xcde (for some reason I have Xcode and Xcode 3 installed)
Undefined Symbols For Architecture X86_64 Mac Qt
This SO post seemed to help a number of people but I haven't done any of the things described there. All I did was follow that simple tutorial.
Undefined Symbols For Architecture X86_64 Mac Os X
Do I need to install something other than Xcode? I thought it included the SDK and all required tools.
I really don't understand anything about the compiler or the shell commands described as I haven't even got to those tutorials yet...
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |