link .a and .o files in GCC
Posted
by David
on Stack Overflow
See other posts from Stack Overflow
or by David
Published on 2010-05-29T10:35:36Z
Indexed on
2010/05/29
10:42 UTC
Read the original article
Hit count: 285
hi!
I have two precompiled library: X.a
and Y.a
and a test.cpp (without main function) source code use these two libraries.
I compiled the C++ using:
g++ -c test.cpp
and I got 'test.o'.
Now how can I link these three together to generate a .a
file because test.cpp use some function in X.a and Y.a and other GCC libraries?
BTW, I am doing these under Windows using MinGW. Can I rename this .a file to .lib and use this .lib in VC?
Thanks!
© Stack Overflow or respective owner