I have 2 object files ( *.o ) and one static library ( *.a ) using g ++ How do I link these files and become 1 object file ( *.o )?
*.o
*.a
I ask for advice ... thanks.
This is one (rare) case when you should not use g++ . Use ld directly:
g++
ld
ld -r -o combined.o foo.o bar.o libxyz.a