www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/04/05:35:42

From: "Michael Schuster (Hd)" <SCHUSTER AT merlin DOT e-technik DOT uni-erlangen DOT de>
Organization: LS f. Elektrische Energieversorgung
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Mon, 4 Dec 1995 09:01:21 MESZ
Subject: header file <math.h>

------- Forwarded Message Follows -------

Date sent:      Sun, 3 Dec 1995 13:47:41 -0500
From:           THutchi141 AT aol DOT com
To:             djgpp AT sun DOT soe DOT clarkson DOT edu
Copies to:      THutchi141 AT aol DOT com
Subject:        header file <math.h>

>Hi
Hi

>I am a new user of djgpp.  I have downloaded several zip files and 
>have successfully
>compiled several simple C programs.  However, I have not been able to 
>use the include
>file <math.h>.  A simple program, such as:

>#include <stdio.h>...
>"ex2-2.c (.text + 0x24): undefined reference sin"
>during compilation. 

I had the same problem 4 weeks ago when I started with GNU. I think 
you do the same mistake as I did: You have to call the compiler with
"gcc <filename> -lm", so that you indicate the Compiler with the -lm 
('m' for mathematics) that you use the mathematic libary ('-l' for 
libary). If you want to use graphics commands instead just compile 
with '- lgr'. Hope that helps.

Schoenen Tag noch!
Michi

- Raw text -


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