When you link, you have to include the math library...
cc -lm -o mathapp mathapp.c
(the -lm does it all ;-))
you just need it at the link, not if you just compile:
cc -c math1.c
cc -c math2.c
cc -c nomath.c
cc -lm -o mathall math1.o math2.o nomath.o
-> ok ?
That has nothing to do with SuSE... it's Unix in general ;-)
Pascal
/nick SuSE52 on #linux (IRCnet)
root on www.student.prov-liege.be
-----Original Message-----
From: Jorge Daniel Ruckj
Pascal Bleser wrote:
When you link, you have to include the math library...
cc -lm -o mathapp mathapp.c
(the -lm does it all ;-)) you just need it at the link, not if you just compile: cc -c math1.c cc -c math2.c cc -c nomath.c
cc -lm -o mathall math1.o math2.o nomath.o
-> ok ?
... Hi Pascal I think that won't work, the -lm has to be written after the last object module -> "cc -o mathall math1.o math2.o nomath.o -lm" BTW, it would be nice not to quote the whole original message. CU, Matthias -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
participants (2)
-
morche@sat1.de
-
pbleser@prov-liege.be