Unix Programming - Re: problems in combining release and debug libraries to get and

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2007 > Re: problems in combining release and debug libraries to get and





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: problems in combining release and debug libraries to get and
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.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com