Dual 32/64bit SDL.dll's?

I’m using SDL 1.2.14

I’m sure this probably isn’t the usual case. Furthermore, I’m not the one building this for Windows (win7RC expired, to broke to get Visual Studio, and too inexperienced to try other routes… plus the 3d app’s api doesn’t like anything but VS it seems). So I have a buddy of mine doing the windows builds for me (I’m on a mac).

I’m developing a plugin for a 3d program that makes use of SDL, and the plugin needs to have SDL.dll in both 32 and 64bit because the 3d app can run in either 32 or 64 bit mode… in a nutshell, it’s very important to be able to boot up into either 32 or 64bit at any given time for any given reason… very. important.

So my buddy’s like “I’ll just change the name of the dll to SDL64.dll when I compile SDL”. So he goes ahead and builds SDL to 64bit with the name change and everything goes successfully. He builds my plugin successfully (linked to the 64bit build of SDL). He sends me the files, I stick the SDL64.dll file into the application folder to test and I get the “where’s SDL.dll?” error on start up (just testing the 64bit build). So I change the name to SDL.dll and all works fine. But when I distribute my plugin, both dll’s need to be there.

So basically, what exactly needs to be done to change the name of SDL.dll for the 64bit compile so I can have both 32 and 64-bit dll’s installed in the user’s application folder and have the 64-bit compile of my plugin use that renamed dll.

Bonus question: The “No 64-bit SDL on OS X 10.5 because Apple didn’t port an API to 64-bit” problem is a real thorn in my side. I’m only using SDL for its joystick functionality; with that in mind, is there any way I can skirt by that limitation and build a cut-down version of SDL for Leopard that’s 64-bit?

thanks and forgive my ignorance (I’m just a 3d junky who got carried away on a project),

-Kevin

i believe that you can compile a 64 bit version of sdl on 10.5 if you
modify the xcode project (Default configuration and set
MACOSX_DEPLOYMENT_TARGET_x86_64 SDKROOT_x86_64 to a proper path) and
compile out the power api (from sdl_config.h)
then remember to recompile all other sdl libraries and your
application or you’ll see an error “image not found”

bye
VittorioOn Sat, May 1, 2010 at 10:24 AM, kvb wrote:

Bonus question: The “No 64-bit SDL on OS X 10.5 because Apple didn’t port an
API to 64-bit” problem is a real thorn in my side. I’m only using SDL for
its joystick functionality; with that in mind, is there any way I can skirt
by that limitation and build a cut-down version of SDL for Leopard that’s
64-bit?

Hi,

just to let you know that SDL 1.3 compiles just fine on 64bit MacOSX
and your program will work with SDL 1.3 in 1.2 compatible mode, most
probably without any code modifications in your application…

PavelOn 1.5.2010, at 10:24, kvb wrote:

I’m using SDL 1.2.14

I’m sure this probably isn’t the usual case. Furthermore, I’m not
the one building this for Windows (win7RC expired, to broke to get
Visual Studio, and too inexperienced to try other routes… plus the
3d app’s api doesn’t like anything but VS it seems). So I have a
buddy of mine doing the windows builds for me (I’m on a mac).

I’m developing a plugin for a 3d program that makes use of SDL, and
the plugin needs to have SDL.dll in both 32 and 64bit because the 3d
app can run in either 32 or 64 bit mode… in a nutshell, it’s very
important to be able to boot up into either 32 or 64bit at any given
time for any given reason… very. important.

So my buddy’s like “I’ll just change the name of the dll to
SDL64.dll when I compile SDL”. So he goes ahead and builds SDL to
64bit with the name change and everything goes successfully. He
builds my plugin successfully (linked to the 64bit build of SDL). He
sends me the files, I stick the SDL64.dll file into the application
folder to test and I get the “where’s SDL.dll?” error on start up
(just testing the 64bit build). So I change the name to SDL.dll and
all works fine. But when I distribute my plugin, both dll’s need to
be there.

So basically, what exactly needs to be done to change the name of
SDL.dll for the 64bit compile so I can have both 32 and 64-bit dll’s
installed in the user’s application folder and have the 64-bit
compile of my plugin use that renamed dll.

Bonus question: The “No 64-bit SDL on OS X 10.5 because Apple didn’t
port an API to 64-bit” problem is a real thorn in my side. I’m only
using SDL for its joystick functionality; with that in mind, is
there any way I can skirt by that limitation and build a cut-down
version of SDL for Leopard that’s 64-bit?

thanks and forgive my ignorance (I’m just a 3d junky who got carried
away on a project),

-Kevin


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


Pavel Kanzelsberger


E-Mail: pavel at kanzelsberger.com
Jabber: kanzelsberger at jabber.org, ICQ: 20990633

That’s excellent news guys, thanks:) I honestly wasn’t expecting to get a hopeful answer on that front:) So, thanks, that made my day:D

The dll problem is the most pressing concern atm. Anyone got an answer on that?

thanks,
Kevin

That might have to do with the way the build was done.

Currently I am at work and cannot have a look at SDL code, but your issue
can be caused by:

  • you are trying to load SDL.dll explicitly
  • you are using a def file with explicitly references sdl.dll
  • the code were you are trying to dynamically link to sdl64.dll was
    originall compiled against an import library that used sdl.dll instead–
    Paulo

On Sat, May 1, 2010 at 6:12 PM, kvb wrote:

That’s excellent news guys, thanks:) I honestly wasn’t expecting to get a
hopeful answer on that front:) So, thanks, that made my day:D

The dll problem is the most pressing concern atm. Anyone got an answer on
that?

thanks,
Kevin


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

Paulo Pinto wrote:

That might have to do with the way the build was done.

Currently I am at work and cannot have a look at SDL code, but your issue can be caused by:

  • you are trying to load SDL.dll explicitly
  • you are using a def file with explicitly references sdl.dll
  • the code were you are trying to dynamically link to sdl64.dll was originall compiled against an import library that used sdl.dll instead


Paulo

  That's excellent news guys, thanks:) I honestly wasn't expecting to get a hopeful answer on that front:) So, thanks, that made my day:D

The dll problem is the most pressing concern atm. Anyone got an answer on that?

thanks,
Kevin


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

Again, forgive my ignorance (3d junky, not programmer).

If we change the name of the dll, do we also need to change the function calls within my code to match the new name?

-kvb> On Sat, May 1, 2010 at 6:12 PM, kvb <@kvb (@kvb)> wrote:

You need at least to change the way you bind to the library, that is why I
was asking how the binding is being made.On Mon, May 3, 2010 at 11:48 PM, kvb wrote:

Paulo Pinto wrote:

That might have to do with the way the build was done.

Currently I am at work and cannot have a look at SDL code, but your issue
can be caused by:

  • you are trying to load SDL.dll explicitly
  • you are using a def file with explicitly references sdl.dll
  • the code were you are trying to dynamically link to sdl64.dll was
    originall compiled against an import library that used sdl.dll instead


Paulo

On Sat, May 1, 2010 at 6:12 PM, kvb <> wrote:

Quote:

That’s excellent news guys, thanks:) I honestly wasn’t expecting to get a
hopeful answer on that front:) So, thanks, that made my day:D

The dll problem is the most pressing concern atm. Anyone got an answer on
that?

thanks,
Kevin


SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Again, forgive my ignorance (3d junky, not programmer).

If we change the name of the dll, do we also need to change the function
calls within my code to match the new name?

-kvb


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

I’ve been able to solve my dll troubles it seems. I broke down and bought a copy of windows and installed vc++ express on it. I’m only able to build 32bit targets for now (my VS 2008 should arrive in a few days), but I was able to change the name of the dll to SDL32.dll and load it successfully:)

I also tested SDL 1.3 on OSX to see if it really works under 10.5 in 64bit like Pavel said… either it doesn’t or I’ve done something wrong. My plugin loads 64bit fine on 10.6.3, but still no 64bit on 10.5.7.

…Yes, I remembered to replace the old 1.2 framework with the newer 1.3 framework (on both drives).

Not sure if it makes any difference, but I built both SDL and my plugin on 10.6.3 using Xcode 3.2.2 (SDL 1.3.0-4429)
SDL using the 10.6 sdk
My plugin using the 10.5 sdk

There was mention of a “1.2 compatibility mode” could that be interfering with 64bit on leopard perhaps?

-Kevin

You can build 64 bit targets using the Windows SDK or DDK. The DDK
still uses msvcrt.lib so it will probably work better with GLib too.

The express editions are a bit crippled, though they’re ok for most
stuff. About the only thing available in vcexpress that’s not in the
SDK is the IDE and there’s plenty of others to choose from.On 10 May 2010 16:05, kvb wrote:

I’ve been able to solve my dll troubles it seems. I broke down and bought a
copy of windows and installed vc++ express on it. I’m only able to build
32bit targets for now (my VS 2008 should arrive in a few days), but I was
able to change the name of the dll to SDL32.dll and load it successfully:)

Yeah, I got a bit frustrated trying to find all the relevant info on how to set that up properly and ended up finding a really good deal on VS 2008 on ebay… almost too good to be true (with a 7 day return guarantee if it is :smiley: ) Better to get a real VS copy now before it’s impossible to find VS 2008 standard and I have to pay over a grand for VS 2010 Pro. A hundred bucks now, or the possibility of $1,100 later… it wasn’t a hard choice;)

-Kevin

Yeah, I got a bit frustrated trying to find all the relevant info on how
to set that up properly and ended up finding a really good deal on VS 2008
on ebay…

It’s not that bad.

Both the SDK and DDK install shortcuts to various build environments.
They’re listed by processor type and target OS. Use cl to compile
individual files, nmake for makefiles, and build for microsoft stuff. The
SDK and DDK readmes have more info, or look for the instructions for
building the samples.On 10 May 2010 17:27, kvb wrote:

Ok, SDL 1.3 working successfully on OSX 10.5 Leopard:) I forgot to change the 64bit targets to 10.5 (oops lol).

-Kevin

I’ll take advantage of the successful compilation to remind that the
fix for these two bugs
http://bugzilla.libsdl.org/show_bug.cgi?id=964
http://bugzilla.libsdl.org/show_bug.cgi?id=965
is just to compile the packages and put them in a dmg
could any dev take action? it won’t take more than 5 minutes :slight_smile:
thanks
VittorioOn Wed, May 12, 2010 at 11:33 PM, kvb wrote:

Ok, SDL 1.3 working successfully on OSX 10.5 Leopard:) I forgot to change
the 64bit targets to 10.5 (oops lol).

-Kevin


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