I'm using gcc 3.3.1 on an alpha/tru64 (v5) system. When archiving together two object files that included the same header, I run into the archiver warning "Ignoring second definition." Consider the following code:
======================================= temp.h: inline int foo() { return 0; } a.cpp: #include "temp.h" int a() { return foo(); } b.cpp: #include "temp.h" int b() { return foo(); } ======================================= I compile each .cpp into a .o : gcc -c -o a.o a.cpp gcc -c -o b.o b.cpp The object files get built fine. Now I want to archive them together into a single .a : ar -r temp.a a.o b.o And I get a warning about how ar is ignoring the second definition of 'foo'. It would appear that the compiler ignored the 'inline' specifier and preserved 'foo' as a symbol in each object file. I've tried to force gcc to truly inline the functions by playing around with gcc's options (such as -finline-size). So far I've been unsuccessful. Any ideas? Thanks, --Steve ([EMAIL PROTECTED]) _______________________________________________ Help-gplusplus mailing list Help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus