From owner-freebsd-questions Mon Dec 11 9:16: 9 2000 From owner-freebsd-questions@FreeBSD.ORG Mon Dec 11 09:16:07 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from xena.gsicomp.on.ca (cr677933-a.ktchnr1.on.wave.home.com [24.43.230.149]) by hub.freebsd.org (Postfix) with ESMTP id C4A4937B402 for ; Mon, 11 Dec 2000 09:16:06 -0800 (PST) Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by xena.gsicomp.on.ca (8.9.3/8.9.3) with SMTP id MAA76491; Mon, 11 Dec 2000 12:15:47 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <009701c06396$12ca83c0$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Alexey Matveichev" , References: <1511312103.20001211152439@7ka.mipt.ru> Subject: Re: Problems compiling C programs made by f2c Date: Mon, 11 Dec 2000 12:16:17 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I have fortran program which nicely compiles with f77. > Now I want to conver it to C and compile it again. > Conversion is ok. I got C code. But problems begin here. > 1. There's a line in C source #include "f2c.h" but f2c didn't create > this file in current directory. All right, I took this file from > /usr/local/include. Was I right? Yes. You could also try passing a -I/usr/local/include parameter to gcc when compiling, and it will find the f2c.h file for you. > 2. Also there's comment that says that I should compile this C code > with keys -lf2c and -lm but when I try to do it (cc -lf2c -lm > lalala.c) there was an error: > /usr/libexec/elf/ld : cannot find -lf2c > > What should I do? ;) Does it compile properly without -lf2c? If not, you will need to go hunting for libf2c. -- Matthew Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message