Issue linking C++ & FORTRAN?

Hi,

I’ve got to create a demo of linking C, C++, FORTRAN, and Assembler in one program. Following the Inter-language Calling chapter in the PGI User’s Guide, I found I can successfully link/run C++/C/Assembler, and FORTRAN/C/Assembler, but can’t seem to link any combinations with C++/FORTRAN together with C/Assembler. This is an Opteron (e.g. x86_64) based machine.

I’d provide the errors, but unfortunately due to Rita, I’ve not regained access to the machines again. They had to do with unresolved references.

Can anyone tell me if there’s any tricks to doing this that mightn’t be spelled out in the user’s guide?

Thanks in advance,

== ken miller ==

Hi Ken,

Without seeing the undefined references, I’m guessing that your missing one of the Fortran runtime libraries on the link line. With the 6.0 release, we’ve added a new flag “-pgf90libs” which will add all necessary Fortran libraries. Try adding this and see what happens.

Once your able, can you post an example of what your trying to do as well as the error messages your receiving?

Thanks,
Mat

Hi,

Yes, it turned out to be the absence of the lib’s.

Thanks!

I do have another issue, but I’ll post a new topic.

Regards,

== ken miller ==