www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/24/08:16:13

Date: Thu, 24 Aug 1995 07:42:14 -0400
From: dj (DJ Delorie)
To: egley AT albany DOT net
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: undefined references to sin, cos in z_exp

> Any pointers to what I should be doing to fix this?  I found z_exp.c all
> over the place.  I can't understand how it's getting into this compilation
> in the first place.

Add -lm to the end of your link line, after the FORTRAN libraries.

> One other thing.  I'm trying to set up my makefile can have a line in it
> where the result is simply a load.  I remember reading in the FAQ about
> having to have another [ld] section and putting in your library path for the
> loader.  I did that, but it's still not finding the libraries. 

It doesn't work that way, since only gcc itself cares about that
environment variable.  You might want to try adding -L$(WHATEVER) to
the ld command line, but it's usually easier to just call gcc to do
the linking.  This is especially true in djgpp V2, where gcc does
other unnatural things in order to link your program.

- Raw text -


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