Results 1 to 2 of 2
  1. #1


    Member Since
    Apr 01, 2008
    Posts
    9
    Unhappy Error: multiple definitions of symbol _main
    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!

    -frike

  2. #2


    Member Since
    Apr 01, 2008
    Posts
    9
    Problem solved!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Undefined symbols _main
    By polyfrag in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 07-28-2013, 02:52 AM
  2. Error: dyld: Symbol not found: _gll_noop
    By govi in forum OS X - Operating System
    Replies: 0
    Last Post: 02-19-2013, 05:02 AM
  3. Check shows quiet Apple update to OS X malware definitions
    By OneMoreThing... in forum Apple Rumors and Reports
    Replies: 1
    Last Post: 08-12-2011, 05:16 PM
  4. Force your Mac to update malware definitions (Updated)
    By OneMoreThing... in forum Apple Rumors and Reports
    Replies: 0
    Last Post: 06-03-2011, 01:40 PM
  5. MacOSX and SDL... _main undefined?
    By shock in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 10-15-2004, 08:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •