Discussion:
Makefile error concerning board_given.c
(too old to reply)
Munro Patrick
2004-04-03 04:32:49 UTC
Permalink
When I try to make my program, I get errors concerning the math functions
called in board_given.c. When I write math.h into my makefile, it asks for
math.h to be supplied in that folder. Is there a way around this, as in,
how do I include math.h, or do I simply need to add it to the folder?
Thanx,
Patrick
Alexander Smith
2004-04-03 04:46:53 UTC
Permalink
You never need to include system libraries in your Makefile. For the
dependencies, you only need to mention files you've written. (Or in this
case, some of them will be files we've written.)

Alexander
Post by Munro Patrick
When I try to make my program, I get errors concerning the math functions
called in board_given.c. When I write math.h into my makefile, it asks for
math.h to be supplied in that folder. Is there a way around this, as in,
how do I include math.h, or do I simply need to add it to the folder?
Thanx,
Patrick
Munro Patrick
2004-04-03 18:50:20 UTC
Permalink
I see. Well, how would I go about resolving these errors then:

/dir/board_given.c:146: undefined reference to 'log'

Also for 'floor' and 'pow'.
Thanx
Patrick
Post by Alexander Smith
You never need to include system libraries in your Makefile. For the
dependencies, you only need to mention files you've written. (Or in this
case, some of them will be files we've written.)
Alexander
Post by Munro Patrick
When I try to make my program, I get errors concerning the math functions
called in board_given.c. When I write math.h into my makefile, it asks for
math.h to be supplied in that folder. Is there a way around this, as in,
how do I include math.h, or do I simply need to add it to the folder?
Thanx,
Patrick
Alexander Smith
2004-04-03 19:36:37 UTC
Permalink
I already answered this question on March 26. Look back through the
newsgroup postings from that day.

Alexander
Post by Munro Patrick
/dir/board_given.c:146: undefined reference to 'log'
Also for 'floor' and 'pow'.
Thanx
Patrick
Post by Alexander Smith
You never need to include system libraries in your Makefile. For the
dependencies, you only need to mention files you've written. (Or in this
case, some of them will be files we've written.)
Alexander
Post by Munro Patrick
When I try to make my program, I get errors concerning the math functions
called in board_given.c. When I write math.h into my makefile, it asks for
math.h to be supplied in that folder. Is there a way around this, as in,
how do I include math.h, or do I simply need to add it to the folder?
Thanx,
Patrick
Loading...