Linking SDL Statically

Hi,
I’ve the same kind of issue.
I guess, as it compile fine with Visual C (but not with ICC nor MinGW) that it’s due to includes.
The Visual C build isn’t usable by MinGW but here is it if someone want to invistigate: https://www.dropbox.com/s/cuylbh3haby5bg9/SDL.lib

The problem of deal with VC includes and MinGW is that it creates a lot of conflict.
Issues start with #include <ddraw.h>, a header contained in the DirectX SDK but if you add it the the compiler path search, dependencies issue will appear and then conflicts between MinGW and VC includes (I guess) create brazillions error.
My knowledges in DirectX aren’t good enough to fix it myself so, I join the Spirrwell request :X

Regards

Taiki

hm… I’m not sure what original thread you’re referring to, but you can’t
mix and match.

Specifically the .lib format that VS generates isn’t compatible with…
anything else. Like wise, the .a and .o formats that mingw generates are
not recognisable by VS.

So if you want to statically link your binaries, you’re stuck using one or
the other.

(This isn’t an SDL limitation; it’s a C/C++ limitation)~
Doug.

On Mon, Feb 11, 2013 at 4:56 AM, Taiki wrote:

**
Hi,
I’ve the same kind of issue.
I guess, as it compile fine with Visual C (but not with ICC nor MinGW)
that it’s due to includes.
The Visual C build isn’t usable by MinGW but here is it if someone want to
invistigate: https://www.dropbox.com/s/cuylbh3haby5bg9/SDL.lib

The problem of deal with VC includes and MinGW is that it creates a lot of
conflict.
Issues start with #include **, a header contained in the DirectX SDK but
if you add it the the compiler path search, dependencies issue will appear
and then conflicts between MinGW and VC includes (I guess) create
brazillions error.
My knowledges in DirectX aren’t good enough to fix it myself so, I join
the Spirrwell request :X

Regards

Taiki


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

That he mentions the includes makes me think that he imported the
Visual Studio projects (several IDEs can do this) and tried to build
it with other toolchains. When I had to do that because I couldn’t
figure out the proper way to build with MinGW I went into
SDL_config_windows.h and started commenting out DirectX support until
it built. Not really much of an issue except because the only
non-DirectX audio alternative has a 500ms latency :frowning:

2013/2/10, Doug <douglas.linder at gmail.com>:> hm… I’m not sure what original thread you’re referring to, but you can’t

mix and match.

Specifically the .lib format that VS generates isn’t compatible with…
anything else. Like wise, the .a and .o formats that mingw generates are
not recognisable by VS.

So if you want to statically link your binaries, you’re stuck using one or
the other.

(This isn’t an SDL limitation; it’s a C/C++ limitation)

~
Doug.

On Mon, Feb 11, 2013 at 4:56 AM, Taiki wrote:

**
Hi,
I’ve the same kind of issue.
I guess, as it compile fine with Visual C (but not with ICC nor MinGW)
that it’s due to includes.
The Visual C build isn’t usable by MinGW but here is it if someone want
to
invistigate: https://www.dropbox.com/s/cuylbh3haby5bg9/SDL.lib

The problem of deal with VC includes and MinGW is that it creates a lot
of
conflict.
Issues start with #include **, a header contained in the DirectX SDK but
if you add it the the compiler path search, dependencies issue will
appear
and then conflicts between MinGW and VC includes (I guess) create
brazillions error.
My knowledges in DirectX aren’t good enough to fix it myself so, I join
the Spirrwell request :X

Regards

Taiki


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

Thanks, it worked perfectly without Joystick, Audio and touch support (stuffs I didn’t need).
Not my topic but thanks :stuck_out_tongue:

You can still use joysticks without DirectX if you really need later
:stuck_out_tongue: (though you miss out on things like rumble and such - but for basic
access to the input it should be enough)

2013/2/11, Taiki :> Thanks, it worked perfectly without Joystick, Audio and touch support

(stuffs I didn’t need).
Not my topic but thanks :stuck_out_tongue:

Do you need Audio/Jostick/Touch?
If not, statically link with this .a http://www.mediafire.com/?p68hefp8z9lu9kw

It’s built from the SDL2 source code on libsdl.org
For Joystick support, well, this build doesn’t contain anything for that =/

The problem is to include dinput.h
You can try to fix it yourself by commenting stuffs in sdl_config_windows then fix issues in things you need…