| View previous topic :: View next topic |
| Author |
Message |
steffven
Joined: 19 May 2008 Posts: 28
|
Posted: Wed May 28, 2008 3:39 am Post subject: Ceil() Problem |
|
|
| Code: | int temp;
int temp2;
...
temp2 = ceil(temp / 34); |
If i try to compile this code, it gives out the following error:
| Code: | | Undefined reference to ceil |
I included math.h and stdio.h.
What's my fault? Help me plz |
|
| Back to top |
|
 |
Insert_witty_name
Joined: 10 May 2006 Posts: 376
|
Posted: Wed May 28, 2008 4:49 am Post subject: |
|
|
You also need to link libmath.
-lm in the LIBS in your makefile. |
|
| Back to top |
|
 |
steffven
Joined: 19 May 2008 Posts: 28
|
Posted: Wed May 28, 2008 5:50 am Post subject: |
|
|
| Works thx for helping! |
|
| Back to top |
|
 |
|