[CMake] more linking problems

Alexander Neundorf a.neundorf-work at gmx.net
Tue May 3 03:58:20 EDT 2005


Hi, 
 
... 
> [snip] 
> > c++ ... <a lot of stuff> -Wl,--whole-archive <list of "convinience"  
> > libraries> -Wl,--no-whole-archive <more stuff>  
>  
> This looks like a very GNU-specific link flag, and is therefore not an  
> option for CMake. 
>  
> > I think currently this is not possible with cmake.  
> > For this to work cmake would have to be able to differentiate between  
> > "normal" static libraries and libtool-like convinience libraries, 
i.e.  
> > static libs which should be included completely.  
>  
> Last week we came up with a possible way to achieve this and I added a  
> feature request: 
>  
> http://www.cmake.org/Bug/bug.php?op=show&bugid=1790 
>  
> Basically we would be able to get the list of object files associated  
> with a given library and then link them into another library using the  
> current external object feature. 
>  
> -Brad 
 
Any opinions about this approach: 


http://66.102.9.104/search?q=cache:0y-utpzDcywJ:lists.gnu.org/archive/html/libtool/2004-09/msg00124.html+libtool+convenience+library+windows&hl=en&ie=UTF-8

 
------------8<---------------8<--------------8<-------------- 
 
If these so-called "convenience" libraries are meant to be linked in 
whole, they should not be ar archives at all. You should just link them 
directly into a relocatable object file: 
 ld -r -o <convenience.obj> *.o 
  
----------8<--------------8<--------------8<------------------- 
 
Would this be portable ? 
 
Bye 
Alex 
 

-- 
+++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail


More information about the CMake mailing list