FUNCTION MAIN()
RETURN NILThe same compiled with xHarbour console (without FWH) is 842240 bytes. The difference is surprisingly high.
EMG
FUNCTION MAIN()
RETURN NILWhich libs do you have included? I think the libraries full of functionality make the .exe bigger ![]()
Only the standard libs: fivehx.lib and fivehc.lib. But please note that I make no call to any of the FWH functions or classes (see my sample). 2.4 MB size bigger is too much for doing nothing, isn't it?
EMG
It definitely are the fwh-libs. If I comment these file out of the samples buildx.bat, my .exe is 831kb, with these libs it is 3404kb.
The commented lines are:
echo %fwh%\lib\Fivehx.lib %fwh%\lib\FiveHC.lib %fwh%\lib\libmysql.lib + >> b32.bc
echo %fwh%\lib\pgsql.lib %hdir%\lib\libpq.lib + >> b32.bc
So, as long as you don't need functionality provided by these libs, you can keep them out of the compiling.
Gilbert,
you definitely missed the point. As the linker put a module in the EXE only if at least one of the symbols contained in that module is referenced, why we have 2.4 MB of modules linked to the EXE if it's only an empty program?
EMG
Enrico,
Comparing the generated .map files we can see which modules are getting linked into the EXE
Antonio,
thank you. I just send the map to your private email. Any thoughts?
EMG
Enrico,
Please don't link FWH libraries and check the EXE size that you get
829440 bytes
EMG
Enrico,
sorry, I assumed the key fwh libs were a kind of a framework which always would be linked, because this these libs at least for some years now make the exe bigger. (At least from fwh1202 I can confirm with a test I made today: 839kb vs. 1772kb.
The file size with actual fivewin/xharbour is simular to yours: 831kb vs. 3404kb, which I wrote some a little further down.
This is something I don't understand:
In both cases I get no linker errors! So the sample is not using any of the FWH symbols. Then why the EXE size grows when fivehx.lib is specified but not used?
EMG
Because FWH libs replace Harbour errorsys
FUNCTION MAIN()
RETURN NIL
FUNCTION ERRORSYS()
RETURN NILyou should review fwh sources one to one searching not static function which reescribe harbour system, in order to understand that size increase.
Please note that I'm not using any Harbour functions in my sample so EXE size should not increase even if FWH redefines any of those.
EMG