Never call any windows functions :-)
Whenever you call library functions, your exe-file will of course increase
in size with the implementation of the library function. However, that
library function might need to call other library fuctions, resulting in a
single call in your program adding a lot of size to the exe file.
For some libraries, it is possible to use dynamic linking, i.e. to use a
xx.DLL instead of a xx.LIB. This means that your exe will stay small, but
if you send out the binary, you must also make sure that the receiver of
the exe file has the needed DLL files (of same or higher version).
/Per W
On Sat, 26 Oct 2002, Paul Bray wrote:
> When I call a windows function in c++ the exe's size jumps from about 10k to
> 49k.
>
> heres an example:
>
> #include <windows.h>
>
> int main(int argc, char *argv[])
> {
> DWORD t;
>
> //t=GetTickCount();
> return 0;
> }
>
> if I uncomment the 't=GetTickCount();' it gets to 49k.
> Is there a way to make it smaller?
>
> Paul
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.401 / Virus Database: 226 - Release Date: 9/10/2002
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ApacheCon, November 18-21 in
> Las Vegas (supported by COMDEX), the only Apache event to be
> fully supported by the ASF. http://www.apachecon.com
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|