question regarding binary size

Frank Skare frank_skare at yahoo.de
Wed Feb 6 06:06:07 PST 2008


I'm new to D and C++ and wonder what effects binary size. I'm experienced with .NET and like that it's 100% OOP and produces relative small binaries. Using C++ with a library like wxWidgets which is OOP and targets different platforms, is it right that the pre processer strips most of the platform dependedend code of multi platform libraries like wxWidgets?

Let's assume I make a instance of a class defined in wxWidgets but don't call any methods in it, will all the code of the class end up in the binary and all code of classes referenced in that class? If so then I don't understand how a C++ OOP programmer can accept the resulting increase in binary size and compilation time. I wonder if something like .NET's extension methods could have fixed this problem. Extension methods is a trick to use static methods like instance methods.



More information about the Digitalmars-d mailing list