www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/23/14:19:53

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1725
Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!EU.net!Germany.EU.net!nntp.gmd.de!news.rwth-aachen.de!hathi!softbrek
From: softbrek AT hathi DOT informatik DOT rwth-aachen DOT de (Hans-Bernhard Broeker)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Special libraries to search for f2c?
Date: 23 Aug 1995 16:12:34 GMT
Organization: RWTH -Aachen / Rechnerbetrieb Informatik
Lines: 29
References: <DDqrn4 DOT 6ry AT jade DOT mv DOT net>
Nntp-Posting-Host: hathi.informatik.rwth-aachen.de
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

egley AT albany DOT net (Skip Egley) writes:

>        
>I'm trying to compile fortran code converted to C via f2c.
>I'm getting many undefined references, most (if not all) of which are
>generated by f2c.  I'm including all the libraries (i.e. -lgpp -lgpl -lm
>-lpc) that are mentioned in the FAQ.  I also used nm to search for these in
>all the libraries.

That's easy: f2c comes with a special library, libf2c (or libf77 and libi77).
You have to link these as well (and you probably don't need -lgpp or -lgpl,
unless you're writing C++), so add "-lf2c" and you should be fine.

>One other thing.  Does djgpp support double complex variables.  I'm also
>getting an undefined reference to zsqrt and nm doesn't report it being in libm.a
>Do I have to write one myself?

If nm doesn't find a routine in any of the *.a's (beware: it might be somewhere
else than libm!), then it's definitely not there.

OTOH, double complex variables *are* supported: just browse the gcc docs for
__complex__ and you'll see what to do. But there aren't any library routines
for this data types, AFAIK, so you're on your own if you want to do anything
more than +, -, *, /, and complex conjugation on them. But maybe you could
use routines from f2c's library for this (if it does contain them).

Hope this helps a bit

Hans-Bernhard Broeker (Aachen, Germany)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019