I’m trying to run my SDL app on ios8, xcode6. The ios simulator works fine, but when I build for a real device I get the linker error: “entry point (_main) undefined”.
I link with libSDL2.a only. When I run “lipo libSDL2.a -info” I see “armv7 armv7s arm64” so that seems fine. My entry point looks like…
Which also seems fine. I also have the linker flag -ObjC, but it doesn’t seem to do anything either way (should I need it?).
So far as I know, SDL_uikitappdelegate.m is supposed to define main. I can build, link, and run for/on the ios simulator, but on a real device it fails to link. Any ideas?
Is it kosher to bump threads? I just can’t believe no one else has run into this where the SDL entry point works in the ios simulator but not on a real device… especially with ~700 views of this question…
Is it possible you don’t have SDLmain included in the build when
targeting a real device, or maybe SDLmain doesn’t have support for the
real device’s architecture so the linker is rejecting it?
–ryan.On 06/22/2015 11:43 AM, divad wrote:
Is it kosher to bump threads? I just can’t believe no one else has run
into this where the SDL entry point works in the ios simulator but not
on a real device… especially with ~700 views of this question…
So, the problem is that I was calling the configure script before before building the ios project, because I was building for a different platform beforehand. What arguments should I pass the configure script as to make building ios equivalent to never having run it? I don’t really know what that script does, but it changes some source code #defines or something right?
mkdir build1
cd build1
…/configure for whatever for platform
make
cd …
mkdir build2
cd build2
…/configure for whatever different platform
Alternately, you can try deleting your build dir manually, or “make
distclean” to delete everything away from a previous configure.
–ryan.On 06/24/2015 02:09 PM, divad wrote:
So, the problem is that I was calling the configure script before before
building the ios project, because I was building for a different
platform beforehand. What arguments should I pass the configure script
as to make building ios equivalent to never having run it? I don’t
really know what that script does, but it changes some source code #defines or something right?