cdave1 / ftgles

A truetype font rendering library for OpenGL ES on iOS devices (iPad and iPhone)
http://cdave1.github.io/ftgles/
MIT License
142 stars 36 forks source link

Try to add to iOS project using proj refs, get "duplicate symbol _af_dummy_script_class" #5

Open claybridges opened 14 years ago

claybridges commented 14 years ago

I tried to duplicate the project settings in BasicDemo, but whatever I do, I still get this linker error:

ld: duplicate symbol _af_dummy_script_class in /Users/clay/ftgles/Xcode/ftgles/build/Debug-iphonesimulator/libFTGLES.a(autofit.o) and /Users/clay/ftgles/Xcode/ftgles/build/Debug-iphonesimulator/libFTGLES.a(afdummy.o)

Does this ring a bell with anyone?

cdave1 commented 13 years ago

I can't be sure without more info, but it sounds like there might be two instances of the static library in your Xcode project.

I recently added some install instructions here:

https://github.com/cdave1/ftgles/blob/master/INSTALL.md

Maybe you could try these install instructions with a blank project to see if you get the same error.

mdeletrain commented 13 years ago

We do have the exact same problem, which can be solved by removing linker's -all_load option. Our problem is that we indeed need this option to be present to build our application, so we're stuck right now. Any solution ?

claybridges commented 13 years ago

I had a similar problem unrelated to FTGLES, after converting to Xcode 4. I solved it by "loading" only specific libraries for which it was intended, instead of a sledgehammer -all_load. Other linker flags (for all configs) might look like, e.g.

-ObjC -force_load "$(BUILT_PRODUCTS_DIR)/libMyLib.a"
mdeletrain commented 13 years ago

Yes thanks, it did the trick ! Actually I was already trying to do it this way but I had difficulties to give library's path. The $(BUILT_PRODUCTS_DIR) macro was the bit I was missing. Thanks again !

Mathieu

2011/4/29 diffengr < reply@reply.github.com>

I had a similar problem unrelated to FTGLES, after converting to Xcode 4. I solved it by "loading" only specific libraries for which it was intended, instead of a sledgehammer -all_load. Other linker flags (for all configs) might look like, e.g.

-ObjC -force_load "$(BUILT_PRODUCTS_DIR)/libMyLib.a"

Reply to this email directly or view it on GitHub: https://github.com/cdave1/ftgles/issues/5#comment_1075641

claybridges commented 13 years ago

Yes, that took much wailing and gnashing of teeth to find.