libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: portland compiler, convenience libraries and templates


From: Ralf Wildenhues
Subject: Re: portland compiler, convenience libraries and templates
Date: Fri, 3 Dec 2004 11:12:54 +0100
User-agent: Mutt/1.4.1i

* Markus Christen wrote on Thu, Dec 02, 2004 at 07:24:23PM CET:
> Markus Christen wrote:
> 
> >problem:
> >linking a program to a library (shared or static) built from a 
> >convenience library fails if the convenience library contains template 
> >functions : unresolved reference.
> 
> (of course when using the portland compiler ;-)
> 
> anyway, already some follow-up:
> 
> what needs to be done is using
> --one_instantiation_per_object
> for all .cc files in the libraries, then before building the final 
> library, do a
> pgCC --one_instantiation_per_object --prelink-objects $CXXFLAGS $LDFLAGS *.o
> on all objects.
> this will create additional object files in a directory Template.dir

It may be necessary to also specify the directory with --template-dir ..

> then, when building the library, all the additional object files need to 
> be added as well
> ar cru normal objects, convenience libraries Template.dir/*.o
> 
> [
> if i ar cru ' d the convenient library objects from Template.dir/ into 
> the convenience library, and then only added the rest to the real 
> library, i still get unresolved references...
> ]

I don't understand this.  Can you explain by showing what you meant with
this?

> if i do this manually, the prog compiles.

Same issue.

> if anybody could put this into something that libtool can do 
> (automatically) (maybe with writing some automake hooks or whatever?), i 
> would be glad...

If nobody beats me to it, I will look into this sometime next week.

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]