10-16-2009, 02:17 AM #1duplicate symbol _OBJC_METACLASS_$
I created a basic command line Foundation Class Based object using the build in template.
I proceed to add a new "MyClass.m" & "MyClass.h" and everything compiles fine.
Now when I try to #import "MyClass.m" in the main file it says:
ld: duplicate symbol _OBJC_METACLASS_$_MyClass in MyClass.o and Link.o...
10-16-2009, 03:51 AM #2
- Member Since
- Jun 25, 2005
- On the road
- 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
Import the .h file.
I think what has happened is that your project already knows to compile the .m file. By including it in another source file, you are asking the compiler to compile it inline with that other source file, so the compiler sees it a second time, hence the duplicate symbol.CameraTime - Time lapse photography for novice and advanced users.
When asking questions, post the version of your software. You'll receive better answers.
Please post your results to the thread as it is good feedback.
10-16-2009, 07:03 AM #3
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By tenleftfingers in forum OS X - Operating SystemReplies: 14Last Post: 10-04-2012, 02:42 AM
By sam256 in forum iOS DevelopmentReplies: 1Last Post: 10-14-2011, 03:56 PM
By MrBruno in forum Switcher HangoutReplies: 7Last Post: 09-14-2011, 02:29 PM
By MelissaR in forum iPhone Hardware and AccessoriesReplies: 4Last Post: 03-15-2011, 10:52 PM
By shwoot56 in forum iOS and AppsReplies: 0Last Post: 09-01-2009, 11:57 AM