I'm trying to add the hypen library to my Xcode iOS project and it has 4 files: hyphen.c, hyphen.h, hnjalloc.c, hnjalloc.h. I dragged them to my project and hit build, but I'm getting undefined symbols for architecture i386 errors. Am I supposed to take any other steps besides dragging them to my project?
-
Rename .c files to .m and check.Parag Bafna– Parag Bafna2012-05-13 05:28:04 +00:00Commented May 13, 2012 at 5:28
-
2@SIGSEGV When or why would that ever work?CodaFi– CodaFi2012-05-13 06:03:16 +00:00Commented May 13, 2012 at 6:03
-
I think you need to use add file to ,not drag. and also need to check the real path of your project have files which you addedwei– wei2012-05-13 06:26:43 +00:00Commented May 13, 2012 at 6:26
Add a comment
|
2 Answers
Make sure you've added them to the build target - including a file into the project without including in the build target can easily cause this error.
3 Comments
bbum
You are assuming that @mohabitar is building and running for the simulator (which is likely). If that is correct, your answer is dead-on. If not, then there is something else amiss.
Snowman
How do I add them to the build target?
Per Johansson
In Xcode 4, you add it in the file inspector (open the file and press ⌘⌥1 if not already visible)