libSDLmain file size

Out of curiosity, and also the intention to build a windows binary for smpeg, I
got the latest CVS, built it with --enable-nasm=no after hearing about the asm
problems; And was wondering why libSDLmain.a is now 4kb, rather than the size of
libsdl.org’s precompiled binary of ~400kb ?

I’m really interested in this, since I was going to ask about the size of
produced exes. I see that libSDLmain contains alot of text, especially
references to header files - has someone turned on a more verbose compile for
the default library?

Am I doing something wrong? Have I somehow toggled between static/dynamic
linking, or am I asking offtopic questions that C++ newbies shouldn’t ask here?

System [athlon xp, windows xp, cygwin]

Cheers,
John

Am I doing something wrong? Have I somehow toggled between
static/dynamic linking, or am I asking offtopic questions that C++
newbies shouldn’t ask here?

The larger one probably has debug symbols compiled in.

–ryan.

And was wondering why libSDLmain.a is now 4kb, rather than the size of org’s
precompiled binary of ~400kb ?

I’m guessing the procompiled binary is compiled with debug information, that
would at least explain the references to headers. The debug information has
information that maps the machinecode to sourcecode. The information enables a
debuger to let you step through lines of code and monitor variable values as
the program is executing.

Am I doing something wrong? Have I somehow toggled between static/dynamic
linking, or am I asking offtopic questions that C++ newbies shouldn’t ask
here?

Static/Dynamic linking is another topic, I’m guessing though that the library
file made for dynamic linking also contains som information about where
functions are located in tha file, as well as version info. Correct me if I’m
wrong here, I’m not too familiar with library making/linking stuff.
And well… it somewhat off topic, but for me its A Ok. It is though not C++
specific question, libraries made with other languages can also contain
debuginformation, but I’m guessing you’ll need a language specific debuger.

Cya, Popi

Ryan C. Gordon wrote:

Am I doing something wrong? Have I somehow toggled between
static/dynamic linking, or am I asking offtopic questions that C++
newbies shouldn’t ask here?

The larger one probably has debug symbols compiled in.

nope … the larger is the STATIC library … the other is only a bind library
maked with the def file and work only with shared library.

static library instead work in static and dynamic link with no error.

(the GCC version for win32 build always the .o files with a bit of debug or
garbage, remove this in the final exe or dll with "strip --strip-unneeded "
command, for the exe file without relocation table use strip without option)

Goul_duKat wrote:

Ryan C. Gordon wrote:

Am I doing something wrong? Have I somehow toggled between
static/dynamic linking, or am I asking offtopic questions that C++
newbies shouldn’t ask here?

The larger one probably has debug symbols compiled in.

nope … the larger is the STATIC library … the other is only a bind
library maked with the def file and work only with shared library.

So, does this mean I need to ship the dll I have compiled with my program ?
I ask because with my cygwin build SDL.dll has gained 200k, whereas the SDLmain
library has lost 400k… [compared to libsdl.org windows release]

I just want to make sure I can keep file sizes down, and keep the program
dynamically linked with SDL.

But thanks for the advice, I hadn’t come across strip :slight_smile:

Cheers,
John> static library instead work in static and dynamic link with no error.

(the GCC version for win32 build always the .o files with a bit of debug
or garbage, remove this in the final exe or dll with "strip
–strip-unneeded " command, for the exe file without relocation table
use strip without option)

John Drinkwater wrote:

So, does this mean I need to ship the dll I have compiled with my program ?

No

I ask because with my cygwin build SDL.dll has gained 200k, whereas the
SDLmain library has lost 400k… [compared to libsdl.org windows release]

the Cyg compile against here c library … (not commercial) the mingw compile
against other library (glibc adapt to win32) and for commercial pourpose
(statical linked in your code …)

I just want to make sure I can keep file sizes down, and keep the
program dynamically linked with SDL.

use Mingw and Msys.

But thanks for the advice, I hadn’t come across strip :slight_smile:

use to reduce the Release binary you make !!! (size down approx 20-50%)

But thanks for the advice, I hadn’t come across strip :slight_smile:

use to reduce the Release binary you make !!! (size down approx 20-50%)

Don’t use strip on DLL’s, since the resulting DLL won’t work on some
versions of Win9X

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

But thanks for the advice, I hadn’t come across strip :slight_smile:

use to reduce the Release binary you make !!! (size down approx 20-50%)

Don’t use strip on DLL’s, since the resulting DLL won’t work on some
versions of Win9X

strip --strip-unneeded ??? (the relocation segment remain in the PE DLL …)

Sam Lantinga wrote:

But thanks for the advice, I hadn’t come across strip :slight_smile:

use to reduce the Release binary you make !!! (size down approx 20-50%)

Don’t use strip on DLL’s, since the resulting DLL won’t work on some
versions of Win9X

strip --strip-unneeded ??? (the relocation segment remain in the PE DLL …)

I don’t know, I haven’t tried it, and I don’t remember which versions of Win9X
it doesn’t work on.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

But thanks for the advice, I hadn’t come across strip :slight_smile:

use to reduce the Release binary you make !!! (size down approx 20-50%)

Don’t use strip on DLL’s, since the resulting DLL won’t work on some
versions of Win9X

Do you remember what kind of symptoms stripping the DLL causes on
the versions of Win9X where it doesn’t work?

TIA,

Joonas PihlajaOn Fri, 24 Oct 2003, Sam Lantinga wrote:

M Joonas Pihlaja wrote:

Don’t use strip on DLL’s, since the resulting DLL won’t work on some
versions of Win9X

Do you remember what kind of symptoms stripping the DLL causes on
the versions of Win9X where it doesn’t work?

The program that uses it just crashes at the start. You get that dialog:
The program has performed an illegal operation and will be shut down, or
something like that.

It happens on Win98 SE, but only for some of SDL libraries. I can’t
recall which.–
Milan Babuskov
http://njam.sourceforge.net