public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter_Hahne@t-online.de (Peter_Hahne)
To: martin@loewis.home.cs.tu-berlin.de
Cc: gcc-help@gcc.gnu.org
Subject: Re:  Linking c++ and fortran
Date: Tue, 07 Mar 2000 13:38:00 -0000	[thread overview]
Message-ID: <12SRgN-0oHTSiC@fwd06.sul.t-online.de> (raw)
In-Reply-To: <200003071950.UAA00932@loewis.home.cs.tu-berlin.de>

Thanks a lot, that works

Martin v. Loewis schrieb:
> I´m trying to call a fortran routine from a c++ routine
> using gcc resp. g77/g++ , but dont get it to work.
> Can somebody tell me how to do it?

You need to declare the external function as extern "C".

Martin

----------------------------------------------------------------------
Dr.Peter Hahne, Zum Pitschgrund 7a, 64747 Breuberg Rai-Breitenbach,
Tel. +49 6165 912424, Fax +49 6165 912425, Mobile +49 171 5178749

WARNING: multiple messages have this Message-ID
From: Peter_Hahne@t-online.de (Peter_Hahne)
To: martin@loewis.home.cs.tu-berlin.de
Cc: gcc-help@gcc.gnu.org
Subject: Re:  Linking c++ and fortran
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <12SRgN-0oHTSiC@fwd06.sul.t-online.de> (raw)
Message-ID: <20000401000000.CTsWOViXbHbNPQWw-gTghkXJiTrqpM8dWrK6lJnC2uA@z> (raw)
In-Reply-To: <200003071950.UAA00932@loewis.home.cs.tu-berlin.de>

Thanks a lot, that works

Martin v. Loewis schrieb:
> I´m trying to call a fortran routine from a c++ routine
> using gcc resp. g77/g++ , but dont get it to work.
> Can somebody tell me how to do it?

You need to declare the external function as extern "C".

Martin

----------------------------------------------------------------------
Dr.Peter Hahne, Zum Pitschgrund 7a, 64747 Breuberg Rai-Breitenbach,
Tel. +49 6165 912424, Fax +49 6165 912425, Mobile +49 171 5178749

  reply	other threads:[~2000-03-07 13:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-07  9:14 Peter_Hahne
2000-03-07 11:58 ` Martin v. Loewis
2000-03-07 13:38   ` Peter_Hahne [this message]
2000-04-01  0:00     ` Peter_Hahne
2000-04-01  0:00   ` Martin v. Loewis
2000-03-07 12:01 ` Alexandre Oliva
2000-03-07 13:40   ` Peter_Hahne
2000-04-01  0:00     ` Peter_Hahne
2000-04-01  0:00   ` Alexandre Oliva
2000-04-01  0:00 ` Peter_Hahne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12SRgN-0oHTSiC@fwd06.sul.t-online.de \
    --to=peter_hahne@t-online.de \
    --cc=gcc-help@gcc.gnu.org \
    --cc=martin@loewis.home.cs.tu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).