delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/06/22/03:09:42

Date: Mon, 22 Jun 92 10:10:24 IDT
From: s2861785 AT cs DOT Technion DOT AC DOT IL (Alon Ziv)
To: smlg1015 AT uxa DOT cso DOT uiuc DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: .c files using <math.h>

...[deleted]...
	   gcc -O -lm work.c -o work
		  ^^<>^^^^^^

gcc is order-sensitive; you need to do

	   gcc -O -o work work.c -lm

so that gcc (ld, in fact) searches for symbols in the math lib after
it knows what your program uses.

   Stuart Lichtenthal smlg1015 AT uxa DOT cso DOT uiuc DOT edu

-az
--
Internet:	s2861785 AT tx DOT technion DOT ac DOT il			   . __
	I'M A STUDENT: When I'm wrong, it's my teacher's fault	  _|  /
	(when I'm right, the credit is all mine!)		 / | /_
								Alon Ziv

- Raw text -


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