autoconf
[Top][All Lists]
Advanced

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

Re: Checking g77 or gfortan calling convention for c++


From: Ralf Wildenhues
Subject: Re: Checking g77 or gfortan calling convention for c++
Date: Tue, 11 Mar 2008 22:36:13 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello Klaas,

* Klaas Vantournhout wrote on Sat, Mar 08, 2008 at 10:55:10PM CET:
> 
> I need to use complex functions from a fortran library in a c/c++ code.

First off, do you know cfortran.h?  While it's not in the Autoconf
spirit of using tests to find out about unknown systems, AFAIK it's
quite comprehensive.  I don't know whether it covers C++, though.

> As I have seen there are two calling conventions for complex functions.
[...]
> I am wondering if it is possible for autoconf to check the above calling
> convention of a library.

I see two possibilities: First, try matching declarations: compile a
code snippet that includes the library header, then re-declare the
function using each way in turn.  The matching one will not trigger a
conflicting declaration error.

Second, you can try to link a small program using one or the other
convention against the library.

Cheers,
Ralf




reply via email to

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