From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-id: <12SRgN-0oHTSiC@fwd06.sul.t-online.de> References: <12SNYt-1cotlIC@fwd00.sul.t-online.de> <200003071950.UAA00932@loewis.home.cs.tu-berlin.de> X-SW-Source: 2000-03/msg00030.html 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <12SRgN-0oHTSiC@fwd06.sul.t-online.de> References: <12SNYt-1cotlIC@fwd00.sul.t-online.de> <200003071950.UAA00932@loewis.home.cs.tu-berlin.de> X-SW-Source: 2000-q1/msg00340.html Message-ID: <20000401000000.CTsWOViXbHbNPQWw-gTghkXJiTrqpM8dWrK6lJnC2uA@z> 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