Author Topic: Build Error: Mac OS X  (Read 1996 times)

Bruce

  • Guest
Build Error: Mac OS X
« on: 24 October 2010, 09:56:14 »
The following error occurs right at the end of the build process - it appears to compile fine but at the very end when it attempts to link the file:

Ld /Users/bruce/Desktop/GlestAEDev/glestae/build/source/game/Release/glestadv normal i386
cd /Volumes/Data/Users/bruce/Desktop/GlestAEDev/glestae
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/bruce/Desktop/GlestAEDev/glestae/build/source/game/Release -F/Users/bruce/Desktop/GlestAEDev/glestae/build/source/game/Release -F/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks -filelist /Users/bruce/Desktop/GlestAEDev/glestae/build/source/game/glestae.build/Release/glestadv.build/Objects-normal/i386/glestadv.LinkFileList -mmacosx-version-min=10.6 -Wl,-search_paths_first -headerpad_max_install_names /Users/bruce/Desktop/GlestAEDev/glestae/build/source/shared_lib/Release/libshared_lib.a -framework OpenGL -framework AGL -framework SDL -framework Cocoa -framework OpenAL -framework lua /usr/lib/libz.dylib /usr/X11R6/lib/libfreetype.dylib -framework libpng /opt/local/lib/libphysfs.dylib /opt/local/lib/libvorbisfile.dylib -framework SDL -framework Cocoa -framework OpenAL -o /Users/bruce/Desktop/GlestAEDev/glestae/build/source/game/Release/glestadv

Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
     (maybe you meant: _SDL_main, cstring=data/core/menu/main_model/menu_main.g3d )
ld: symbol(s) not found
collect2: ld returned 1 exit status


Any ideas?
« Last Edit: 24 October 2010, 23:51:21 by Omega »

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: BUILD ERROR: Mac OS X
« Reply #1 on: 24 October 2010, 15:43:47 »
I've no idea what's wrong there. Did you follow silnarm's guide?
https://sourceforge.net/apps/trac/glestae/wiki/CompileGuideMac

The linker didn't find a main function (crt is part of libc). Something is really messed up here. Better start again with a clean build directory and try to follow silnarm's guide. Did you use MacPorts to get the dependencies too?

If that doesn't work please post the file glestadv.LinkFileList as it looks like it holds the object files which should contain main.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Build Error: Mac OS X
« Reply #2 on: 25 October 2010, 06:35:10 »
Just to bring everyone up to date, I spoke with Bruce on IRC yesterday. He was originally using the 'proper' mac frameworks, which work with MG, thanks to GeoVah's source changes.  I was obviously avoiding any source changes when I was getting it working on Mac, as I would be unable to maintain any of it, so for GAE we build Unix style using the macports versions of everything (except OpenAL).

Unfortunately, even after pointing CMake at the macports versions of everything, he got the same error.  He is now concentrating on getting the MG bundle working correctly.  Next time I'm at my parent's place I will take some more thorough notes on what I did.
Glest Advanced Engine - Code Monkey

Timeline | Downloads