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.

Error: multiple definitions of symbol _main

Post Reply New Thread Subscribe

Thread Tools

Member Since: Apr 01, 2008
Posts: 9
frike is on a distinguished road

frike is offline
Hi everyone!

Last week I went to a C++ course in uni. We learnt some of the basics of C++ and our final exam was to write a program that gave out the Mandelbrot set on a canvas.
So, today I tried to run the program at home but I got the following error:

/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: multiple definitions of symbol _main
class.o definition of _main in section (__TEXT,__text)
exam.o definition of _main in section (__TEXT,__text)
collect2: ld returned 1 exit status

That error came up when I was trying to bind(is that the correct word?) the programm using

g++ -o draw *.o

class.o is a programm defining complex numbers and exam.o is the one which should "draw" the mandelbrot set on the canvas.

Everything worked fine in uni, so I don't know where the problem is.

Any help would be much appreciated!

QUOTE Thanks

Member Since: Apr 01, 2008
Posts: 9
frike is on a distinguished road

frike is offline
Problem solved!
QUOTE Thanks

Post Reply New Thread Subscribe

« Creating startup service in Mac | mounting ext3 filesystems on panther »
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 Starter
Last Post
What the @ symbol means thewhistler1 OS X - Operating System 6 03-20-2008 07:23 PM
Wierd Symbol in the Menu tanth OS X - Operating System 2 02-27-2008 07:13 AM
iPod frozen w/ Apple symbol veedub iPod Hardware and Accessories 0 08-17-2005 04:40 PM

All times are GMT -4. The time now is 09:30 PM.

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

Welcome to

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?