Lua 5.0 in a FreeBSD 4.1

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Lua 5.0 in a FreeBSD 4.1

Evandro Sestrem


Hello,

I'm trying compile a project using Lua 5.0 in FreePascal (2.0.2 [2005/11/17]
for i386) in a FreeBSD 4.1.

I installed Lua 5.0 in FreeBSD using build (everything goes ok).

I can compile this project in Delphi (in a Windows) and Kylix (in a Debian).
In FreePascal + FreeBSD, it compiles ok, but when it is linking I got this
error:

/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'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_asin':
lmathlib.o(.text+0x106): undefined reference to 'asin'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_acos':
lmathlib.o(.text+0x142): undefined reference to 'acos'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_atan':
lmathlib.o(.text+0x17e): undefined reference to 'atan'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_atan':
lmathlib.o(.text+0x1cb): undefined reference to 'atan2'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_ceil':
lmathlib.o(.text+0x20a): undefined reference to 'ceil'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_floor':
lmathlib.o(.text+0x246): undefined reference to 'floor'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_mod':
lmathlib.o(.text+0x293): undefined reference to 'fmod'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_sqrt':
lmathlib.o(.text+0x2d2): undefined reference to 'sqrt'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_pow':
lmathlib.o(.text+0x31f): undefined reference to 'pow'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_log':
lmathlib.o(.text+0x35e): undefined reference to 'log'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_log10':
lmathlib.o(.text+0x39a): undefined reference to 'log10'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_exp':
lmathlib.o(.text+0x3d6): undefined reference to 'exp'
/usr/local/lib//liblualib.a(lmathlib.o): In function 'math_random':
lmathlib.o(.text+0x6e1): undefined reference to 'floor'
lmathlib.o(.text+0x78d): undefined reference to 'floor'



What's the minimum requirement to compile a Lua project in a FreeBSD (is it
possible in 4.1?)?


Thanks in advance,

Evandro Sestrem
www.blueone.com.br

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 14/1/2006

Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 in a FreeBSD 4.1

David Given
On Monday 16 January 2006 19:24, Evandro Sestrem wrote:
[...]
> /usr/local/lib//liblualib.a(lmathlib.o): In function 'math_sin':
> lmathlib.o(.text+0x52): undefined reference to 'sin'

Link with -lm --- you need to include the standard maths library.

--
+- David Given --McQ-+ "There is nothing in the world so dangerous ---
|  [hidden email]    | and I mean *nothing* --- as a children's story that
| ([hidden email]) | happens to be true." --- Master Li Kao, _The Bridge
+- www.cowlark.com --+ of Birds_

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Lua 5.0 in a FreeBSD 4.1

Evandro Sestrem
In reply to this post by Evandro Sestrem

> Link with -lm --- you need to include the standard maths library.

Do you mean "EXTRA_LIBS= -lm" in the config file? I used this configuration
when I installed the Lua. But those errors happens when I compile (in fact,
when is linking) in FreePascal.

Is there a way to know if Lua is correctly with -lm?

Thanks,

Evandro Sestrem

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 14/1/2006

Reply | Threaded
Open this post in threaded view
|

RES: Re: Lua 5.0 in a FreeBSD 4.1

Evandro Sestrem

> Is there a way to know if Lua is correctly with -lm?

No mind, I got it. I had to inform -k '-lm' to the FreePascal Compiler.

Thanks (and sorry for the off-topic)!


Evandro Sestrem
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 14/1/2006