Larger size with Mingw

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Larger size with Mingw

Post by sudip »

Hello All,

I found that apps created with Mingw compiler are of larger size than apps created with BCC 5.5.1.
I noticed this first with another GUI library of Harbour (gtwvg) and again confirmed this with Minigui (testing same code with official and extended version).

Is there any switch with Mingw compiler to decrease the size of executable files?

Please don't misunderstand me. I am not comparing any software tool with another. I want to know the fact as a student of computer software :)

Thanks in advance.

With best regards.

Sudip
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Larger size with Mingw

Post by Rathinagiri »

Sudip,

Had you included any resource files especially bitmaps?

May I know the difference between the sizes of hello world.prg with GUI and without GUI?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Larger size with Mingw

Post by sudip »

Hello Rathi,

Thanks a lot for your reply :)

I tested "hello world" sample with both HMG 3.0.0 and Minigui Ext 1.7 (build 77)

For HMG Official size is 1,893 kb
For HMG Ext size is 1,192 kb

I didn't test without gui.

Again one more thing I have noticed - BCC 5.5.1 is a (very ;) ) old version comparing Mingw compiler. About 9 years old :idea:

With best regards.

Sudip
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Larger size with Mingw

Post by Rathinagiri »

Sorry Sudip,

I want to know the zipped sizes of both the executables too. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Larger size with Mingw

Post by sudip »

Hello Rathi,

I used upx.exe to compress both files (Hello World example)

HMG 3.0.0 Official - 878 kb
HMG Ext 1.7 (Build 77) - 439 kb

Then I used 7-zip to compress both exe files into .zip format.

HMG 3.0.0 Official - 636 kb
HMG Ext 1.7 (Build 77) - 431 kb


IMHO, as BCC 5.1.1 is a very old version (2000 ?) and MingW is a current version (2009), MingW creates a bigger executable files (may be it has more options for newer O/S s) :!:

Again, I have deep respect and love for both versions :) I am only a very basic learner of HMG. So please don't mind about my ignorance :)

With best regards.

Sudip
With best regards,
Sudip
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Larger size with Mingw

Post by mol »

I've noticed that apps created by hmg 3.0 grown in comparison with hmg 294.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Larger size with Mingw

Post by sudip »

Hello Marek,

You are correct, HMG 3.0.0 compiled exe files are of greater size than that of HMG 2.9.5.

Again, I also noticed increase of speed. I am not a very experienced user, but I also feel HMG 3.0.0 compiled apps are very robust. :)

With best regards.

Sudip
With best regards,
Sudip
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Larger size with Mingw

Post by Roberto Lopez »

sudip wrote: <...>
Again, I have deep respect and love for both versions :) I am only a very basic learner of HMG. So please don't mind about my ignorance :)
Please, feel free to express any opinion :).

My thinking is (and always was) that HMG is not better or worst than any other thing.

It is simply an alternative to other development tools.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Larger size with Mingw

Post by sudip »

Hello Master Roberto,

Thanks a lot for understanding me :)

I have very little knowledge of C. I can only "try" to understand C programs. I started this topic, because I am searching for some switches of Mingw which can decrease size of .exe files (other than compressing with upx).

I came to know this first with using xMate and gtwvg library. Where as per advice of Pritpal Bedi, I was able to decrease the size of .exe file and compiling time using Mingw.

BCC is a very fast compiler and produced .exe file size is very small, but again it's an older product. And I heard that latest version of BCC it not a "freeware" (again please correct me if I am wrong).

I hope, one day our HMG will be ported with other operating systems also (eg., Linux, Unix), in that case Mingw compiler (as an open source software) will play a great role.

IMHO, efficiency and robustness of a software don't need smaller size. But, smaller size is preferable (especially in my case) when we transfer our software thru net to our clients.
It is simply an alternative to other development tools.
HMG it not a "only" an alternative to other development tools to me. Because I am investing my time and energy for software development with it (yesterday I got another project, which will be developed with it). I strongly believe it's my future :)

Thank you again for this open discussion :)

With best regards.

Sudip
With best regards,
Sudip
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Larger size with Mingw

Post by Roberto Lopez »

sudip wrote:
BCC is a very fast compiler and produced .exe file size is very small, but again it's an older product. And I heard that latest version of BCC it not a "freeware" (again please correct me if I am wrong).
I'm not using BCC since 2005. I haven't any info about it, but AFAIK, it is owned by a private company and it is closed source, so, anything is possible...
sudip wrote: IMHO, efficiency and robustness of a software don't need smaller size.
I agree.
sudip wrote: But, smaller size is preferable (especially in my case) when we transfer our software thru net to our clients.
Ok.

As many other times, your topics generate changes in HMG :)

MingW comes with an utility called 'strip.exe' (not in HMG dtribution at present time).

I've attached to this message.

Please, use: strip.exe yourapp.exe.

It should solve your problems.

I'll include it and do by default from the next test release.

Thanks.
Attachments
strip.rar
(292.57 KiB) Downloaded 298 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply