Page 1 of 1

Memory optimalisation for .dll-s

PostPosted: Dec 11, 2003 @ 6:32pm
by goro
Guys,

I have run into strange linker problem.

I want to create a .dll file, and it seems that the EVC puts all not static functions into the code, even if I do not refer to them.
(if I declare them for static then the linker ignores them)

This is true for functions defined in .c files.
Functions defined in .cpp and not referred are properly ignored.

It is important for me to have the .dll as small as possible.

So I have two ways, one to find, redeclare static/delete all unused functions or to find a linker solution for it. :-)

(I do not want to do the first as some of these functions are part of generic modules and are used in other applications too)

If I link my code to .exe it is ok.

I have read the whole evc documentation.
No luck.

Any hints?

Thanks,
G.

PostPosted: Dec 11, 2003 @ 9:24pm
by Dan East

PostPosted: Dec 11, 2003 @ 9:34pm
by goro

PostPosted: Dec 11, 2003 @ 9:56pm
by Dan East
What if you func does not access global variables?

Dan East

PostPosted: Dec 11, 2003 @ 10:06pm
by goro