OS X-Undefined symbols: "_main" link error

OS X-Undefined symbols: “_main” link error

Hi,

I am trying to build my cross-platform game
on Mac OS X using current Code::Blocks.

Game compiles, but does not link.
The link error I am receiving is this:--------------------------------------------------------------------------------------
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
(maybe you meant: _SDL_main)
ld: symbol(s) not found

Any help would be appreciated.
Thanks!

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.com

did you link to SDLmain ?On Thu, Jul 8, 2010 at 8:22 AM, Jesse Palser wrote:

OS X-Undefined symbols: “_main” link error

Hi,

I am trying to build my cross-platform game
on Mac OS X using current Code::Blocks.

Game compiles, but does not link.
The link error I am receiving is this:


Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
(maybe you meant: _SDL_main)
ld: symbol(s) not found


Any help would be appreciated.
Thanks!

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi,

Thank you for your response.

Here are my linker settings in Code::Blocks on Mac OS X:------------------------------------------------------------------------------
-framework SDL_ttf
-framework SDL_mixer
-framework SDL_image
-framework OpenGL
-framework SDL

What do I add to above to solve link error previous mentioned?

Thanks, I am a complete newbie to OS X & I hate it.

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.com

On 07/08/2010 08:33 AM, Alex Barry wrote:

did you link to SDLmain ?

On Thu, Jul 8, 2010 at 8:22 AM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:

 OS X-Undefined symbols: "_main" link error

Hi,

I am trying to build my cross-platform game
on Mac OS X using current Code::Blocks.

Game compiles, but does not link.
The link error I am receiving is this:
--------------------------------------------------------------------------------------
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
(maybe you meant: _SDL_main)
ld: symbol(s) not found
--------------------------------------------------------------------------------------
Any help would be appreciated.
Thanks!

Jesse
16BitSoft(R)
Video Game Design Studio
www.16BitSoft.com <http://www.16BitSoft.com>
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Ah, you can’t hate it after just a couple of days (unless you mean you hate
being a newbie :-/)…

Jonny DOn Thu, Jul 8, 2010 at 5:43 AM, Jesse Palser wrote:

Hi,

Thank you for your response.

Here are my linker settings in Code::Blocks on Mac OS X:


-framework SDL_ttf
-framework SDL_mixer
-framework SDL_image
-framework OpenGL
-framework SDL


What do I add to above to solve link error previous mentioned?

Thanks, I am a complete newbie to OS X & I hate it.

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.com

On 07/08/2010 08:33 AM, Alex Barry wrote:

did you link to SDLmain ?

On Thu, Jul 8, 2010 at 8:22 AM, Jesse Palser wrote:

OS X-Undefined symbols: “_main” link error

Hi,

I am trying to build my cross-platform game
on Mac OS X using current Code::Blocks.

Game compiles, but does not link.
The link error I am receiving is this:


Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
(maybe you meant: _SDL_main)
ld: symbol(s) not found


Any help would be appreciated.
Thanks!

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi,

I’ve used Max OS X Snow Kitten for about a week.
It is the most unfriendly OS I have ever used.
Its bloated and confusing.

Sorry, but I hate it.

Anyone have an answer to my original question?

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.comOn 07/08/2010 08:50 AM, Jonathan Dearborn wrote:

Ah, you can’t hate it after just a couple of days (unless you mean you
hate being a newbie :-/)…

Jonny D

On Thu, Jul 8, 2010 at 5:43 AM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:

Hi,

Thank you for your response.

Here are my linker settings in Code::Blocks on Mac OS X:
------------------------------------------------------------------------------
-framework SDL_ttf
-framework SDL_mixer
-framework SDL_image
-framework OpenGL
-framework SDL
------------------------------------------------------------------------------
What do I add to above to solve link error previous mentioned?

Thanks, I am a complete newbie to OS X & I hate it.


Jesse
16BitSoft(R)
Video Game Design Studio
www.16BitSoft.com <http://www.16BitSoft.com>


On 07/08/2010 08:33 AM, Alex Barry wrote:
did you link to SDLmain ?

On Thu, Jul 8, 2010 at 8:22 AM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:

     OS X-Undefined symbols: "_main" link error

    Hi,

    I am trying to build my cross-platform game
    on Mac OS X using current Code::Blocks.

    Game compiles, but does not link.
    The link error I am receiving is this:
    --------------------------------------------------------------------------------------
    Undefined symbols:
    "_main", referenced from:
    start in crt1.10.6.o
    (maybe you meant: _SDL_main)
    ld: symbol(s) not found
    --------------------------------------------------------------------------------------
    Any help would be appreciated.
    Thanks!

    Jesse
    16BitSoft(R)
    Video Game Design Studio
    www.16BitSoft.com <http://www.16BitSoft.com>
    _______________________________________________
    SDL mailing list
    SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
    http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



_______________________________________________
SDL mailing list
SDL at lists.libsdl.org  <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi Jesse,

this FAQ might help you:
http://wiki.libsdl.org/moin.cgi/FAQMacOSX

In particular, the two questions about “SDLmain.m” seem to relate to your problem.

MartinOn 08.07.2010 14:55, Jesse Palser wrote:

Hi,

I’ve used Max OS X Snow Kitten for about a week.
It is the most unfriendly OS I have ever used.
Its bloated and confusing.

Sorry, but I hate it.

Anyone have an answer to my original question?

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.com

On 07/08/2010 08:50 AM, Jonathan Dearborn wrote:

Ah, you can’t hate it after just a couple of days (unless you mean you hate
being a newbie :-/)…

Jonny D

On Thu, Jul 8, 2010 at 5:43 AM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:

Hi,

Thank you for your response.

Here are my linker settings in Code::Blocks on Mac OS X:

-framework SDL_ttf
-framework SDL_mixer
-framework SDL_image
-framework OpenGL
-framework SDL

What do I add to above to solve link error previous mentioned?

Thanks, I am a complete newbie to OS X & I hate it.

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.com http://www.16BitSoft.com

On 07/08/2010 08:33 AM, Alex Barry wrote:

did you link to SDLmain ?

On Thu, Jul 8, 2010 at 8:22 AM, Jesse Palser <SLNTHERO at aol.com <mailto:SLNTHERO at aol.com>> wrote:

OS X-Undefined symbols: “_main” link error

Hi,

I am trying to build my cross-platform game
on Mac OS X using current Code::Blocks.

Game compiles, but does not link.
The link error I am receiving is this:

Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
(maybe you meant: _SDL_main)
ld: symbol(s) not found

Any help would be appreciated.
Thanks!

Jesse
16BitSoft®
Video Game Design Studio
www.16BitSoft.com http://www.16BitSoft.com

I’ve used Max OS X Snow Kitten for about a week.

It is the most unfriendly OS I have ever used.
Its bloated and confusing.

I think your judgement is a bit too early. Maybe the problem is you are too
used to other environments, you can not like osx, but it’s hard to say it’s
less “friendly” to a normal user than windows or linux.

Sorry, but I hate it.

Anyone have an answer to my original question?

I think u miss SDL_Main, every OSX SDL program should include a small
library called libSDLmain.a (at least with SDL 1.2, and this is true also
for other platforms).

If u use the XCode template you’ll have a “main.m” instead of libSDLmain.a
(that you should have if you compiled SDL from sources), you don’t have to
change this file, just add it to your project.–
Bye,
Gabry