Forum Discussion
Altera_Forum
Honored Contributor
21 years agoI assume by "abstract classes" you mean classes with pure virtual methods (e.g. virtual int foo() = 0).
If you are linking with libstdc++, it could be that a large chunk of exception handling code is being included (I've found operator new & delete particularly bad for this and always override them). Have a look at your linker map (if you're not generating one, add "-Map <filename>" to your linker flags) for any evidence of this. Compiler options "-fno-exceptions" and "-fno-rtti" help greatly in keeping EC++ code size down (assuming you're not actually using exceptions and run-time type info!). The code for virtual classes will be bigger due their vtables etc, but not by a factor of 15 (unless the non-virtual ones were very small and numerous). If your classes really are abstract, try stubbing out the "__cxa_pure_virtual()" function as follows: extern "C" void __cxa_pure_virtual() { } Steve.