Ceil() Problem

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
steffven
Posts: 28
Joined: Mon May 19, 2008 7:37 pm

Ceil() Problem

Post by steffven »

Code: Select all

int temp;
int temp2;
...
temp2 = ceil(temp / 34);
If i try to compile this code, it gives out the following error:

Code: Select all

Undefined reference to ceil
I included math.h and stdio.h.
What's my fault? Help me plz
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

You also need to link libmath.

-lm in the LIBS in your makefile.
steffven
Posts: 28
Joined: Mon May 19, 2008 7:37 pm

Post by steffven »

Works thx for helping!
Post Reply