• 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: Lukas Westermann <email@hidden>
  • Date: Mon, 08 Jul 2002 16:04:57 +0200
  • Organization: AdNovum

Lukas Westermann wrote:

thanks alot, but
i'd prefer to use C++...
Does somebody have a solution
for C++ and SDL ?

thx anyway chris
- Luki

Chris Szewczyk wrote:

SDL does indeed change the name of main() in it's definitions for Mac OS X
and Windows. If you did the normal SDL framework install then there should
be a new option when you create a new project for an "SDL Application". You
must keep the two files that SDL includes in there ( SDLmain.h and SDLmain.m
I think ). You must also link to the Cocoa framework as these are Cocoa
files. SDLmain.m initializes SDL and such and then calls your main functions
( which it redefined in the header file. )

Hope that helps,
--Chris Szewczyk

on 7/8/02 9:27 AM, Andreas Monitzer at email@hidden wrote:


On Monday, July 8, 2002, at 09:45 , 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...
Do I need gcc3 or does SDL have some bugs ?

Somewhere in the SDL headers there's a "#define main SDLmain" (or
something similar). The problem is that the SDL lib doesn't include any
main itself (which would call SDLmain), or that main doesn't work
somehow, I can't remember right now.
I didn't get it to work myself, and I wouldn't call me a newbie at all.
On the other hand, I didn't really play around more than one or two
hours.

andy
--
DigiTunnel 1.0 released, offering full PPTP-support for Mac OS X!
http://www.gracion.com/vpn/







--
+---------------------------------------------------------------------+
Lukas Westermann mailto:email@hidden


AdNovum Informatik AG http://www.adnovum.ch phone: +41 (1) 272 6111
Roentgenstrasse 22, CH-8005 Zuerich fax: +41 (1) 272 6312
+---------------------------------------------------------------------+
AdNovum Software Inc. San Mateo, CA 94404 phone: +1 (650) 525 9322
1400 Fashion Island Boulevard, Suite 309 fax: +1 (650) 525 9324
+---------------------------------------------------------------------+
_______________________________________________
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: Chris Szewczyk <email@hidden>)

  • Prev by Date: RE: NSOutlineView at wits end
  • Next by Date: Re: Create an Cocoa Scriptable application :
  • Previous by thread: Re: ld: undefined symbol _main (but a main does exist)
  • Next by thread: Agvtool and Versioning with PB
  • Index(es):
    • Date
    • Thread