Get the default link configuration gcc uses when calling the linker.
- by witkamp
I am using the CodeSorcery arm-eabi-gcc tool chain and I have a problem using ld separate from gcc
I can compile my simple program and link it, if I let gcc call the ld.
This works not problem
g++ test.cpp; # Works
This does not work because of missing symbols
g++ -c test.cpp
ld -o test crti.o crtbegin.o test.o crtend.o crtn.o -lgcc -lc -lstdc++; # Fails
Notice I am adding the gcc libraries to the ld command
What am I missing?
Also if there is a better way to make configuring ld to using the default gcc linking?
Thanks