Undefined Reference To Ceil

The function I tried to use was ceil and I get the following error:: undefined reference to `ceil' collect2: ld returned 1 exit status I am using the latest Ubuntu and math.h is there. I tried to use -lm in a different computer and it work perfectly. Does anyone know how to solve this problem? That guide is a copy of the one from here & also doesn't reflect some changes that were recently made. The changes came from discussions we had about installing static libs & includes to /usr/local & the potential issues that doing so may cause.

The Math.ceil() function always rounds a number up to the next largest integer.

Note: Math.ceil(null) returns integer 0 and does not give a NaN error.

Syntax

Undefined Reference To Ceil

Parameters

x
A number.

Return value

The smallest integer greater than or equal to the given number.

Description

Because ceil() is a static method of Math, you always use it as Math.ceil(), rather than as a method of a Math object you created (Math is not a constructor).

Examples

Perl ceil

Using Math.ceil()

The following example shows example usage of Math.ceil().

Decimal adjustment

Undefined Reference To Ceiling Light

Specifications

Specification
Unknown specification
# sec-math.ceil

Browser compatibility

Undefined Reference To Ceil

BCD tables only load in the browser

Undefined Reference To Symbol 'ceil@@glibc_2.0'

See also