• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ld: undefined symbol _main (but a main does exist)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld: undefined symbol _main (but a main does exist)


  • Subject: Re: ld: undefined symbol _main (but a main does exist)
  • From: Cameron Hayne <email@hidden>
  • Date: Mon, 8 Jul 2002 04:46:24 -0400

When you created the new PB project, I assume you choose "C++ Tool" as the type of project? That would seem the right choice. Then you would have automatically got an empty main function in the file main.cpp (under the "source" category. Make sure the checkbox beside main.cpp is checked.
... Cameron
--
Cameron Hayne (email@hidden)
Hayne of Tintagel

On Monday, July 8, 2002, at 04:24 am, Lukas Westermann wrote:

On Monday, July 8, 2002, at 03:45 am, Lukas Westermann wrote:
oke, as i mentoied in the subject `ld` will always
close with `ld failed, undefined symbol _main`, but
a main does 200% exist (i'm a newbee but not such a
newbee). This problem is only if i'm using the SDL-Framework.
Finally on a Linux-Mac with gcc3 it will works perfectly...
It's not likely related to the framework. This error almost always means that you haven't told 'ld' where to find your main(). Eg. if main() is in a separate file, you might have omitted to tell gcc to compile it and ld to link it in. Do you use a different makefile for OS X than for Linux? Or are you using Project Builder in OS X?
... Cameron
-- Cameron Hayne (email@hidden)
Hayne of Tintagel
I have created a new PB-Project
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: ld: undefined symbol _main (but a main does exist) (From: Lukas Westermann <email@hidden>)

  • Prev by Date: Re: Preview in Internet Explorer
  • Next by Date: Re: When is my delegate released?
  • Previous by thread: Re: ld: undefined symbol _main (but a main does exist)
  • Next by thread: Re: ld: undefined symbol _main (but a main does exist)
  • Index(es):
    • Date
    • Thread