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: Markus Christen
Subject: Re: portland compiler, convenience libraries and templates
Date: Fri, 03 Dec 2004 11:38:45 +0100
User-agent: Mozilla Thunderbird 0.8 (X11/20040917)

Hi Ralf

Ralf Wildenhues wrote:

* 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 ..

yes, but for me the default Template.dir (altough it looks ugly, probably you might want to move it to .libs or something) was ok.

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?

that was not so clear, i agree. what i meant was if i put the objects in Template.dir into the convenience library (with ar cru) and do not add them while building the real library ('cause they should already be in the convenience library) they do NOT end up in the final library and i get unresolved references. this means (at least for me now) that when i build the final library i have to add all the template objects of ALL convenience libraries + the convenience libraries themselves. i think this is weired. maybe i forget something when building the convenience library?


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


i would appreciate a lot! (right now i only have the intel compiler to produce OpenMP code, i would like to see another one) - and we actually bought the PG compiler.

i couldn't get it to work using shared libraries (although i did not try very hard)

thanks,
markus

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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