non-lazy-ptr

libtool vs ar for creating a static library (xcode linker)

假装没事ソ 提交于 2019-12-12 15:27:56
问题 Creating a static library on Mac 10.5 with xcode via libtool and with ar via the command line both generate a libMainProject.a file however, when trying to use the one generate by libtool to link into a xcode application I end up with multiple message like "vtable for project1 referenced from: _ZTV27project1$non _lazy _ ptr in libMainProject.a(project1.o)" Using the ar one is totally fine and links correctly. I have tried the addition of the -c option to the libtool while linking but that

illegal text reloc to non_lazy_ptr error while building in xcode 4 with libav* libraries

不打扰是莪最后的温柔 提交于 2019-12-01 05:46:33
问题 I'm trying to build a simple application that uses ffmpeg's libav* libraries in xcode 4 and getting the following error: ld: illegal text reloc to non_lazy_ptr from /ffmpeg/temp/ffmpeg-0.8/builduni/lib/libavcodec.a(ac3.o) in _ff_ac3_bit_alloc_calc_psd for architecture i386 I've already tried to run ranlib -c libavcodec.a to fix this problem, but nothing happend. One more thing: my libav* libraries are fat binaries (i386 + x86_64). Any ideas what can it be? 回答1: I have the same error. Finally,