www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-Sent: | 9 Dec 2001 01:18:05 GMT |
Message-ID: | <000b01c1804f$61867ce0$0100a8c0@hannes> |
From: | "Hans Horn" <hannes AT 2horns DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | linking C++ code against library from fortran sources |
Date: | Sat, 8 Dec 2001 17:18:16 -0800 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
Hi everybody, I have a bunch of old numerical fortran77 sources, which I compiled with g77 and archived into, say libMyF77.a. I want those f77 functions to be called from w/i a c++ program. Here are my two questions: 1. to satisfy the compiler, I have to declare the functions used as 'extern'. Which language string should I be using? "FORTRAN" as language string (as I had used on other platforms, such as AIX) is not recognized by gcc/g++ gcc/g++ accepts only either "C" or nothing (or ????). Which is the right one here? 2. the linker complains about the functions used as undefined references. I think I've told the linker properly, where to look for archives (-L<path to libMyF77.a> -lMyF77). What am I doing wrong? Do I have to do something special when archiving? Do I have to raise another magic flag for the linker???? Any light shed onto the subject is severely appreciated! Hans -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |