Question

I am using FreeType library in an Xcode project.

I downloaded the source code from their website, I used ./configure, make, and make install on that.

The code is built, but when I include the .dylib or .a file in Xcode, I get following error.

ld: warning: ignoring file /source/freetype2/lib/libfreetype.a, file was built for archive which is not the architecture being linked (i386): /source/freetype2/lib/libfreetype.a

I tried ./configure with different flags to compile freetype for i386 [i386 because we're still using Carbon in our project, and carbon projects cant be run on x86_64 architecture]

Here is what I have tried with ./configure so far..

./configure --host=i386-apple-darwin

./configure CC="gcc -arch i386" CXX="g++ -arch i386

What other options do I have for freetype/configure?

I have also tried homebrew, it did work, but the app was crashing on half of the OSX on the line where freetype was called. Upon further readingsit was clear that the crash was because the way freetype library was built.

So, I downloaded the fresh freetype source from their website, and was trying to compile and configure it for i386. Any help will be much appreaciated.

Était-ce utile?

La solution

Use macports:

 $ sudo port install freetype +universal

and spend more time on your own projects.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top