Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2006 09:29:45 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Evandro Sestrem <evandro@blueone.com.br>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Lua 5.0 and FreeBSD 4.1
Message-ID:  <20060117152945.GD10326@dan.emsphone.com>
In-Reply-To: <JDEEIIBHJLLEKHOLEFIICEAGDOAA.evandro@blueone.com.br>
References:  <JDEEIIBHJLLEKHOLEFIICEAGDOAA.evandro@blueone.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jan 17), Evandro Sestrem said:
> I'm trying compile a project using Lua 5.0 (www.lua.org) in FreePascal
> (2.0.2 [2005/11/17] for i386) in a FreeBSD 4.1.
> 
> The Lua 5.0 is correctly installed.
> 
> It compiles ok, but when it is linking I got these errors:
> 
> /usr/local/lib//liblualib.a(lmathlib.o): In function 'math_sin': lmathlib.o(.text+0x52): undefined reference to 'sin'
> /usr/local/lib//liblualib.a(lmathlib.o): In function 'math_cos': lmathlib.o(.text+0x8e): undefined reference to 'cos'
> /usr/local/lib//liblualib.a(lmathlib.o): In function 'math_tan': lmathlib.o(.text+0xca): undefined reference to 'tan'
> 
> In what version of FreeBSD (or libc) these functions (sin, cos, tan,
> ...) were implemented?

Math functions are in libm.  Add -lm to your link line.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060117152945.GD10326>