From owner-freebsd-questions Mon Dec 11 16:15:44 2000 From owner-freebsd-questions@FreeBSD.ORG Mon Dec 11 16:15:42 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 3860B37B400 for ; Mon, 11 Dec 2000 16:15:42 -0800 (PST) Received: (qmail 40578 invoked by uid 100); 12 Dec 2000 00:15:41 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14901.28205.733756.261686@guru.mired.org> Date: Mon, 11 Dec 2000 18:15:41 -0600 (CST) To: Alexey Matveichev Cc: questions@freebsd.org Subject: Re: Problems compiling C programs made by f2c In-Reply-To: <12427767@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alexey Matveichev types: > 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? As already mentioned, it's probably better to use -I/usr/local/include on the command line. > 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 Install /usr/ports/lang/f2c, and possibly add -L/usr/local/lib to the command line before -lf2c. No, I don't know why f2c (which is in the base system) requires libraries that are in the ports tree. http://www.mired.org/home/mwm/ Independent WWW/Unix/FreeBSD consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message