Re: [ooc-compiler] Size of executable
Brought to you by:
mva
|
From: Stewart G. <sgr...@ii...> - 2004-06-03 04:06:04
|
Hi Frank, The large executable is probably due to the amount of code that you are importing from the OOC core libraries. Under Windows, "C" programs dynamically link to the equivalent "libc", so they are much smaller. For a comparison, try the "Example4" module in the Windows package (see VisualOberon CVS). It uses just Windows.MessageBoxA to output a message. From memory, this results in an executable that is about 60K in size (ie. basically the size of the statically linked GC). If you dynamically link the GC, it should be even smaller. Currently, there is no support for building dynamic libraries under Windows. Microsoft's DLLs are idiosyncratic in that they need special compile-time treatment for libraries and their clients (eg. the requirements for dllimport/dllexport attributes on imported/exported functions). AFAIK, Windows DLLs are still not supported by libtool, which is OOC's default tool for managing shared libraries. With a few specific assumptions (eg. that all functions exported from modules are are exported from the library), it should be possible to build and use DLLs under Windows using just the support that is now in GCC 3. Cheers, Stewart On Tuesday, June 1, 2004, at 03:45 AM, Frank Hrebabetzky wrote: > Finally I get my programs compiled and running and my work done. So my > attention is attracted by less important aspects now (no more need to > respond within impressive 50 min.). > > I compiled 'Hello world' on Win32/MinGW and got an executable of 1.3 > MByte. Option --no-rtc had no influence. I am somewhat lost with 10 > lines of gcc options scrolling up upon 'oo2c -Mv hello.Mod'. What is > happening? Everything being linked statically and the programs would > run on PCs without MinGW and oo2c? How could I reduce the size? > > ----------------------------------------------------------- > Frank Hrebabetzky Tel.: +55/48/239-2258 > Photonita Ltda Fax: +55/48/239-2200 > Parque Tec. Alfa - Ed. CELTA email: fh...@ph... > Florianopolis, SC WWW: www.photonita.com.br > 88030-000 > Brasil > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle > 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > ooc-compiler mailing list > ooc...@li... > https://lists.sourceforge.net/lists/listinfo/ooc-compiler > |