Error Compiling SDL 1.3 (haptic error 50% fixed)

Edgar Simo <bobbens gmail.com> writes:

Hello,

I have no idea. Since it’s basically a difference in a struct
(otherwise it’d work with directx 7.0), just by copying the directx.h or
whatever it was over it should work. I don’t have much experience
with mingw32, so I have no idea.

The update on this so far is that if you go to www.devpaks.org
Go to the DirectX part, there you can get the DirectX 9.0c libraries for Mingw

the devpak is just a .tar.bz2 with a fancy name.

After I merged the includes and libraries into my mingw32 system, it all
compiled fine, but then failed when linking giving the following errors:

build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x0): multiple definition of
GUID_CustomForce' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x18): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x10): multiple definition ofGUID_Friction’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x28): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x20): multiple definition
of GUID_Inertia' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x38): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x30): multiple definition ofGUID_Damper’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x48): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x40): multiple definition
of GUID_Spring' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x58): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x50): multiple definition ofGUID_SawtoothDown’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x68): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x60): multiple definition
of GUID_SawtoothUp' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x78): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x70): multiple definition ofGUID_Triangle’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x88): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x80): multiple definition
of GUID_Sine' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x98): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x90): multiple definition ofGUID_Square’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0xa8): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0xa0): multiple definition
of GUID_RampForce' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0xb8): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0xb0): multiple definition ofGUID_ConstantForce’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0xc8): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x100): multiple definition
of GUID_Joystick' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0xd8): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x110): multiple definition ofGUID_SysKeyboard’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0xe8): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x120): multiple definition
of GUID_SysMouse' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0xf8): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x130): multiple definition ofGUID_Unknown’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x108): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x140): multiple definition
of GUID_POV' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x118): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x150): multiple definition ofGUID_Key’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x128): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x160): multiple definition
of GUID_Button' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x138): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x170): multiple definition ofGUID_Slider’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x148): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x180): multiple definition
of GUID_RzAxis' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x158): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x190): multiple definition ofGUID_RyAxis’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x168): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x1a0): multiple definition
of GUID_RxAxis' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x178): first defined herCreating library file: build/.libs/libSDL.dll.a e build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x1b0): multiple definition ofGUID_ZAxis’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x188): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x1c0): multiple definition
of GUID_YAxis' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x198): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x1d0): multiple definition ofGUID_XAxis’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x1a8): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x1e0): multiple definition
of IID_IDirectInputEffect' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x1b8): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x230): multiple definition ofIID_IDirectInputDevice2W’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x1c8): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x240): multiple definition
of IID_IDirectInputDevice2A' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x1d8): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x250): multiple definition ofIID_IDirectInputDeviceW’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x1e8): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x260): multiple definition
of IID_IDirectInputDeviceA' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x1f8): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x2b0): multiple definition ofIID_IDirectInput2W’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x208): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x2c0): multiple definition
of IID_IDirectInput2A' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x218): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x2d0): multiple definition ofIID_IDirectInputW’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x228): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x2e0): multiple definition
of IID_IDirectInputA' build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x238): first defined here build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x310): multiple definition ofCLSID_DirectInputDevice’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x248): first defined here
build/.libs/SDL_syshaptic.o:SDL_syshaptic.c:(.rdata+0x320): multiple definition
of `CLSID_DirectInput’
build/.libs/SDL_dxjoystick.o:SDL_dxjoystick.c:(.rdata+0x258): first defined here
collect2: ld returned 1 exit status
make: *** [build/libSDL.la] Error 1

Sorry for the long list of error nonsense. But that’s where it’s at so far. I
would really like to get this working with mingw32, so if there is any testing
or modifications I can do, let me know.

Thanks!

Micah

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Micah Brening wrote:

The update on this so far is that if you go to www.devpaks.org
Go to the DirectX part, there you can get the DirectX 9.0c libraries for Mingw

the devpak is just a .tar.bz2 with a fancy name.

After I merged the includes and libraries into my mingw32 system, it all
compiled fine, but then failed when linking giving the following errors:

It seems like it’s defining the GUID twice, just in case I tried moving
the INITGUID (i don’t think i put that there) to only the joystick part.

Sorry for the long list of error nonsense. But that’s where it’s at so far. I
would really like to get this working with mingw32, so if there is any testing
or modifications I can do, let me know.

Try applying this patch, probably won’t work but you can never know.
DirectX isn’t my specialty as you can tell :). It just seems like a
sort of gigantic hack.

Edgar
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkj02X4ACgkQolm4VNX3QTxKBACfUYIMaIG2wCINym5ThMd6oQpb
RPEAoOsY0uNToT28Oxro6f1eCCIRrG8O
=cDQH
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: sdl-mingw32.diff
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20081014/16790dd7/attachment.asc