New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

duplicate symbol _OBJC_METACLASS_$


Post Reply New Thread Subscribe

 
Thread Tools
Bracer

 
Bracer's Avatar
 
Member Since: Oct 07, 2009
Location: Singapore
Posts: 14
Bracer is on a distinguished road

Bracer is offline
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...

Please Help.
Thanks.
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
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.
QUOTE Thanks
Bracer

 
Bracer's Avatar
 
Member Since: Oct 07, 2009
Location: Singapore
Posts: 14
Bracer is on a distinguished road

Bracer is offline
I see, thanks xstep.
QUOTE Thanks

Post Reply New Thread Subscribe


« how to copy unix executable file by java program that preserve their properties | PackageMaker 3.0.4 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
How to quickly find and remove duplicate tracks in iTunes pruppert iPod Hardware and Accessories 8 11-01-2010 04:54 PM
Removing Duplicate emails in mail.app (Apple Script).. question notherand OS X - Apps and Games 2 08-13-2009 07:39 PM
Duplicate txt msgs on iPhone Smiley1028 iOS and Apps 0 02-09-2009 09:30 AM
MKV to DivxAVI AC3 for xbox 360 ffmpegx problems Please help!! biggyk Movies and Video 3 01-24-2009 07:52 PM
Adobe indesign - crashing on save??? kade119 OS X - Apps and Games 1 07-31-2008 08:07 PM

All times are GMT -4. The time now is 08:44 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?