| Paul Pluzhnikov 2007-03-27, 1:19 pm |
| "wolverine" <kiran.happy@gmail.com> writes:
> Assume i have a library "libabc.a" which is build in debug ( -g
> flag) mode and another library "libxyz.a" which is build in release (-
> O2 flag) mode. Then if i link these 2 libraries like
>
> 1) g++ -g test.cpp -labc -lxyz (debug build)
>
> 2) g++ -O2 test.cpp -labc -lxyz (release build)
>
> Will any of the above 2 builds result in a incorrect executable ?
Library link order is orhogonal to whether both, any, or none were
compiled with debug info.
If the libraries do not depend on each other's symbols, either link
order is fine.
If they are not, you should put them in correct order. More here:
http://webpages.charter.net/ppluzhnikov/linker.html
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
|