Building SDL with MinGW

Hi,

several questions about building SDL with MinGW & MSYS:

  • Where to get the DirectX files required to build it with DirectX support and
    where to put them?
  • If I want to build with NASM, where to put the NASM binaries?
  • The output file is huge! Probably because it contains debugging information.
    How to disable debugging information completely in the building process?

Thanx,
Yaron

Hi Yaron,

The first two questions are posted in the SDL with Mingw FAQ :

http://www.libsdl.org/extras/win32/mingw32/README.txt

Concerning the 3rd question. You can use strip to downsize the dll or compiled executable. Also, you can use UPX (http://upx.sf.net) after strip to downsize the dll or compiled executable.

I use strip and UPX for deploying my projects :slight_smile:

Regards,

Niels Wagenaar________________________________

Van: sdl-bounces+nwagenaar=digitaldynamics.nl at libsdl.org namens Yaron Cohen-Tal
Verzonden: vr 15-10-2004 11:20
Aan: SDL
Onderwerp: [SDL] Building SDL with MinGW

Hi,

several questions about building SDL with MinGW & MSYS:

  • Where to get the DirectX files required to build it with DirectX support and
    where to put them?
  • If I want to build with NASM, where to put the NASM binaries?
  • The output file is huge! Probably because it contains debugging information.
    How to disable debugging information completely in the building process?

Thanx,
Yaron


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/ms-tnef
Size: 4610 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20041015/c5263cc8/attachment.bin

Thanx, Niels. As for the DLL size, I’m not looking for stripping tools, I just
want to build SDL without the -g and I wondered if there’s an easier way than
manually editting the many makefiles…On Friday 15 October 2004 11:22, Niels Wagenaar wrote:

Hi Yaron,

The first two questions are posted in the SDL with Mingw FAQ :

http://www.libsdl.org/extras/win32/mingw32/README.txt

Concerning the 3rd question. You can use strip to downsize the dll or
compiled executable. Also, you can use UPX (http://upx.sf.net) after strip
to downsize the dll or compiled executable.

I use strip and UPX for deploying my projects :slight_smile:

Regards,

Niels Wagenaar


Van: sdl-bounces+nwagenaar=digitaldynamics.nl at libsdl.org namens Yaron
Cohen-Tal Verzonden: vr 15-10-2004 11:20
Aan: SDL
Onderwerp: [SDL] Building SDL with MinGW

Hi,

several questions about building SDL with MinGW & MSYS:

  • Where to get the DirectX files required to build it with DirectX support
    and where to put them?
  • If I want to build with NASM, where to put the NASM binaries?
  • The output file is huge! Probably because it contains debugging
    information. How to disable debugging information completely in the
    building process?

Thanx,
Yaron


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi Yaron,

No problem. I’m glad to help fellow SDL developers :slight_smile:

Well, I wrote about stripping tools because of the “The output file is huge!” sentence in your 3rd question. Debug information at the library level is very usefull when you want tot debug a SDL application.

You may want to use the SDL Runtime Libraries for WIN32 since the DLL is a lot smaller then the compiled one. And, sometimes your own compiled version of the SDL.dll can producte strange effects making it harder to understand if the problem is related to your application or to your SDL library.

Several times I had used my own compiled SDL.dll which conflicted and producted a General Protection Fault while with the Runtime DLL on the SDL website, didn’t. I just use the source to compile the libsdl.a and for installtion of the headers. But I use the Runtime SDL.dll download when I want to test my applications (and deploy them).

Regards,

Niels Wagenaar________________________________

Van: sdl-bounces+nwagenaar=digitaldynamics.nl at libsdl.org namens Yaron Cohen-Tal
Verzonden: vr 15-10-2004 11:42
Aan: A list for developers using the SDL library. (includes SDL-announce)
Onderwerp: Re: [SDL] Building SDL with MinGW

On Friday 15 October 2004 11:22, Niels Wagenaar wrote:

Thanx, Niels. As for the DLL size, I’m not looking for stripping tools, I just
want to build SDL without the -g and I wondered if there’s an easier way than
manually editting the many makefiles…

Hi Yaron,

The first two questions are posted in the SDL with Mingw FAQ :

http://www.libsdl.org/extras/win32/mingw32/README.txt

Concerning the 3rd question. You can use strip to downsize the dll or
compiled executable. Also, you can use UPX (http://upx.sf.net) after strip
to downsize the dll or compiled executable.

I use strip and UPX for deploying my projects :slight_smile:

Regards,

Niels Wagenaar


Van: sdl-bounces+nwagenaar=digitaldynamics.nl at libsdl.org namens Yaron
Cohen-Tal Verzonden: vr 15-10-2004 11:20
Aan: SDL
Onderwerp: [SDL] Building SDL with MinGW

Hi,

several questions about building SDL with MinGW & MSYS:

  • Where to get the DirectX files required to build it with DirectX support
    and where to put them?
  • If I want to build with NASM, where to put the NASM binaries?
  • The output file is huge! Probably because it contains debugging
    information. How to disable debugging information completely in the
    building process?

Thanx,
Yaron


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/ms-tnef
Size: 6402 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20041015/778b4a9d/attachment.bin

If you call
./configure --help

you will get a list of available options and environment variables to
configure the build process.
In your case you want to adjust CFLAGS to “-O2” or something.

It should also be possible to call
make CFLAGS="-O2"

for temporary changing the variables with each make call.

Regards,
Johannes

< http://libufo.sourceforge.net > The OpenGL GUI ToolkitOn Friday 15 October 2004 11:42, Yaron Cohen-Tal wrote:

On Friday 15 October 2004 11:22, Niels Wagenaar wrote:

Thanx, Niels. As for the DLL size, I’m not looking for stripping tools, I
just want to build SDL without the -g and I wondered if there’s an easier
way than manually editting the many makefiles…

Humm… When building with nasm, I get the error:

Creating library file: .libs/libSDL.dll.a
c:\MinGW\bin…\lib\gcc-lib\mingw32\3.3.1…\mingw32\bin\ld.exe:
hermes/.libs/libhermes.a(mmxp2_32.o): bad reloc address 0x87 in section
`.text’

Any idea?On Friday 15 October 2004 11:49, Niels Wagenaar wrote:

Hi Yaron,

No problem. I’m glad to help fellow SDL developers :slight_smile:

Well, I wrote about stripping tools because of the “The output file is
huge!” sentence in your 3rd question. Debug information at the library
level is very usefull when you want tot debug a SDL application.

You may want to use the SDL Runtime Libraries for WIN32 since the DLL is a
lot smaller then the compiled one. And, sometimes your own compiled version
of the SDL.dll can producte strange effects making it harder to understand
if the problem is related to your application or to your SDL library.

Several times I had used my own compiled SDL.dll which conflicted and
producted a General Protection Fault while with the Runtime DLL on the SDL
website, didn’t. I just use the source to compile the libsdl.a and for
installtion of the headers. But I use the Runtime SDL.dll download when I
want to test my applications (and deploy them).

Regards,

Niels Wagenaar


Van: sdl-bounces+nwagenaar=digitaldynamics.nl at libsdl.org namens Yaron
Cohen-Tal Verzonden: vr 15-10-2004 11:42
Aan: A list for developers using the SDL library. (includes SDL-announce)
Onderwerp: Re: [SDL] Building SDL with MinGW

On Friday 15 October 2004 11:22, Niels Wagenaar wrote:

Thanx, Niels. As for the DLL size, I’m not looking for stripping tools, I
just want to build SDL without the -g and I wondered if there’s an easier
way than manually editting the many makefiles…

Hi Yaron,

The first two questions are posted in the SDL with Mingw FAQ :

http://www.libsdl.org/extras/win32/mingw32/README.txt

Concerning the 3rd question. You can use strip to downsize the dll or
compiled executable. Also, you can use UPX (http://upx.sf.net) after
strip to downsize the dll or compiled executable.

I use strip and UPX for deploying my projects :slight_smile:

Regards,

Niels Wagenaar


Van: sdl-bounces+nwagenaar=digitaldynamics.nl at libsdl.org namens Yaron
Cohen-Tal Verzonden: vr 15-10-2004 11:20
Aan: SDL
Onderwerp: [SDL] Building SDL with MinGW

Hi,

several questions about building SDL with MinGW & MSYS:

  • Where to get the DirectX files required to build it with DirectX
    support and where to put them?
  • If I want to build with NASM, where to put the NASM binaries?
  • The output file is huge! Probably because it contains debugging
    information. How to disable debugging information completely in the
    building process?

Thanx,
Yaron


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Yaron Cohen-Tal wrote:

Humm… When building with nasm, I get the error:

Creating library file: .libs/libSDL.dll.a
c:\MinGW\bin…\lib\gcc-lib\mingw32\3.3.1…\mingw32\bin\ld.exe:
hermes/.libs/libhermes.a(mmxp2_32.o): bad reloc address 0x87 in section
`.text’

Any idea?

Go to google, find the answer in the SDL archives.

Basically there is a bug in your version of binutils. Upgrade/downgrade it.

Stephane

Yaron Cohen-Tal wrote:

Hi,

several questions about building SDL with MinGW & MSYS:

  • Where to get the DirectX files required to build it with DirectX support and
    where to put them?
  • If I want to build with NASM, where to put the NASM binaries?
  • The output file is huge! Probably because it contains debugging information.
    How to disable debugging information completely in the building process?

Just FYI, usually the stripping is done during "make install"
Is this a problem to do this by hand ?

Stephane