Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2000 18:15:41 -0600 (CST)
From:      Mike Meyer <mwm@mired.org>
To:        Alexey Matveichev <dlesha@7ka.mipt.ru>
Cc:        questions@freebsd.org
Subject:   Re: Problems compiling C programs made by f2c
Message-ID:  <14901.28205.733756.261686@guru.mired.org>
In-Reply-To: <12427767@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexey Matveichev <dlesha@7ka.mipt.ru> 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.

	<mike
--
Mike Meyer <mwm@mired.org>			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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14901.28205.733756.261686>