Can you run .a in Windows?

Apr 3, 2015 at 6:38pm
I downloaded SDL2 library but I noticed that even though I downloaded Windows version, all my dll and lib files are in .a format. I thought .a formats are only usable in Linux. Or am I wrong?
Apr 3, 2015 at 7:08pm
You must have downloaded the wrong thing. I got them all in dll and lib.

https://www.libsdl.org/download-2.0.php

Under Development Libraries:

You can get 2 different stuff dependong on what you want.
Apr 3, 2015 at 7:17pm
I downloaded mingw32 version. The thing that makes me confusing is, there is lib folder inside the SDL2 and there's another lib folder inside 'i686-w64-mingw32'. The lib files inside i686 are .a files and lib files inside SDL2 are .lib format. I heard that you shouldn't use ones that are inside SDL2 because they are not for mingw. Is this wrong?
Apr 3, 2015 at 7:22pm
I just downloaded mingw32 to check it out, I saw both .a versions and .lib versions.

You probably looked in the file called i686-w64ming... or x86... but there is a lib one staring you right in the face with the lib files.

http://gyazo.com/8c9bc7a3a994b8b558cac6f996af5a46

Now, Ive never really used SDL or anything, so I might be balls to the walls wrong here.

Edit: Also the SDL2.dll File is there

Edit2: There is a couple of videos showing how to install SDL2 with mingw, see if that helps -

https://www.youtube.com/results?search_query=installing+sdl2+mingw
Last edited on Apr 3, 2015 at 7:24pm
Apr 3, 2015 at 7:45pm
Thanks for the replay but the picture of lib folder that you linked is the one that gives me an error. (Warning: corrupt drectve etc.) I searched online to find the answer and one of the answer was that if you're using mingw, you should use libs inside the i686-w64ming which are .a formatted so that's why I asked why SDL windows version gives me a linux lib folder.

(I heard that mingw version of SDL also comes with MSVC so that's why there's lib folder.)

I also searched on YouTube to see how people install SDL but unfortunately I never saw a video that shows how to install SDL for command prompt, most of them are for codeblcoks.

I guess I gotta keep searching...
Apr 3, 2015 at 7:48pm
.a format is compatible with MinGW (Windows).
In my MinGW/lib folder, all of the library files are .a, ex: libvorbis.a, libopengl32.a.
In my experience, a .lib file is generally meant for Visual C++ linker, although this is not necessarily the case, I'm not too up-to-date on the specifics.
Maybe this helps? http://www.mingw.org/wiki/Specify_the_libraries_for_the_linker_to_use

Sorry if that doesn't help the actual problem but I wanted to clarify that.

It might be easier to compile your own library file and dlls, I'm not sure what SDL's make system is like though.

_____

Working with MinGW can be a pain, I agree, because people think that Windows == VC++.
Also, the problem might stem from MinGW64 vs MinGW32, but I'm afraid I don't have much experience in dealing with that problem. https://wiki.libsdl.org/Installation
Last edited on Apr 3, 2015 at 7:56pm
Apr 3, 2015 at 7:53pm
that's why I asked why SDL windows version gives me a linux lib folder.


Because your using Linux tools. mingw is just a port of Linux tools very similar to Cygwin but without the terminal.
Apr 3, 2015 at 8:05pm
DLLs, which are usable with any compiler that can link to them


I found out that SDL doesn't really care about MinGW. I guess I have to deal with those Warning signs whenever I compile my project...thanks for the replys guys.

(so the solution is to use VisualStudio dlls and deal with those annoying Warnings...)
Last edited on Apr 3, 2015 at 8:06pm
Apr 4, 2015 at 12:08am
Yes, you can use those .a files on Windows provided you're using MinGW or Cygwin. You can also use a .lib file.
Topic archived. No new replies allowed.