Building for iOS makes 2 libs called libSDL2.a?

Whenever I build for iOS with Xcode it generates two files:

Xcode-iOS/SDL/build/Debug-iphoneos/libSDL2.a
Xcode-iOS/SDL/build/Debug-iphonesimulator/libSDL2.a

The problem I’m having is that both files are named the same, so I can’t just add both to the list of libraries my game links against and let it pick the right one based on the architecture (btw, the readme seems to say this will work, but it also says the libraries will have different names, which they don’t). They have to have different names. So my other options seems to be either combine the two into a fat library, or rename one or other other. I’d rather it just work out of the box.

How do other people handle it?

You can supply different library paths depending on whether you are
compiling a simulator or device build.On 3/14/2014 7:18 AM, braddabug wrote:

Whenever I build for iOS with Xcode it generates two files:

Xcode-iOS/SDL/build/Debug-iphoneos/libSDL2.a
Xcode-iOS/SDL/build/Debug-iphonesimulator/libSDL2.a

The problem I’m having is that both files are named the same, so I
can’t just add both to the list of libraries my game links against and
let it pick the right one based on the architecture (btw, the readme
seems to say this will work, but it also says the libraries will have
different names, which they don’t). They have to have different names.
So my other options seems to be either combine the two into a fat
library, or rename one or other other. I’d rather it just work out of
the box.

How do other people handle it?


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


Pallav Nawani
Game Designer/CEO
http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming

I recommend making a “fat” (a.k.a. Universal) binary. Use the lipo
command line tool to combine the multiple files you have into a single
file:
lipo -create <…> -output

-EricOn 3/13/14, braddabug wrote:

Whenever I build for iOS with Xcode it generates two files:

Xcode-iOS/SDL/build/Debug-iphoneos/libSDL2.a
Xcode-iOS/SDL/build/Debug-iphonesimulator/libSDL2.a

The problem I’m having is that both files are named the same, so I can’t
just add both to the list of libraries my game links against and let it pick
the right one based on the architecture (btw, the readme seems to say this
will work, but it also says the libraries will have different names, which
they don’t). They have to have different names. So my other options seems to
be either combine the two into a fat library, or rename one or other other.
I’d rather it just work out of the box.

How do other people handle it?


Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/