Page 1 of 1

Linux executable size big ?

Posted: Thu Apr 15, 2004 4:49 pm
by USCode
:?: Anyone know why executables created by PB are so big on Linux as compared to the ones generated on Windows?

One of my applications on Windows is 17KB, but is 890KB when compiled on Linux!

Anything I can do to reduce that? Maybe some library is being linked in and I can pass a flag to prevent that?

Posted: Thu Apr 15, 2004 10:37 pm
by Fred
I will check but it was even smaller than windows exe here..

More info.

Posted: Fri Apr 16, 2004 12:16 am
by USCode
Thanks Fred!
I'm on SuSE 9.0 and compiled the program with PB 3.81, using this syntax:

./pbcompiler MyProgram.pb -e MyProgram

One strange thing I noticed is that in addition to creating huge executables, it also creates a 'purebasic.exe' executable when I compile my normal Linux executable??? So at that time I have 2 executables. If I rename the 'purebasic.exe' file to a normal Linux executable name, then I can run it! This file has the exact same bytesize as my Linux executable.

I also got this warning in trying to compile an app:
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../../i586-suse-linux/bin/ld: Warning: alignment 1 of symbol `PB_StringBase' in purebasic.o is smaller than 4 in Network.a(Network.o)


I must be doing something wrong! Some setting wrong?

Posted: Sat Apr 24, 2004 3:46 pm
by Snooze
I've got the same problem... :?:

Size

Posted: Thu Jun 10, 2004 7:06 pm
by USCode
:?: Fred, were you able to figure out the Linux executable size issue?
Thanks!

Posted: Wed Sep 15, 2004 9:16 am
by Shannara
Any Answer?

Posted: Wed Sep 29, 2004 5:29 pm
by GeoTrail
When I compile on Mandrake 10.1 the filesize is about the same as on Windows.

Posted: Wed Sep 29, 2004 7:12 pm
by olejr
I also did a test compile on Windows & Linux,
and the filesize was: Linux: 10740bytes Windows: 7168bytes..

As of the problem with two executables I don't have that..

BTW: MandrakeLinux 10.0 & Windows XP Pro. PB v3.91

Posted: Wed Sep 29, 2004 8:09 pm
by GeoTrail
olejr, could you post the code you compiled here so I can test it in Mandrake 10.1?

Posted: Wed Sep 29, 2004 9:04 pm
by olejr
GeoTrail wrote:olejr, could you post the code you compiled here so I can test it in Mandrake 10.1?
It's a "project" I'm working on.. 9 source files....

Posted: Wed Sep 29, 2004 10:11 pm
by GeoTrail
OK, I'll compile one of the PB samples then :)

Posted: Thu Sep 30, 2004 12:41 am
by Shannara
on coLinux, it is about 2x the windows size.