[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Simple embedded hello world C example for 5.1
- From: KHMan <keinhong@...>
- Date: Wed, 09 Jun 2010 09:40:59 +0800
Wink Saville wrote:
Today, was my first stab at trying Lua and I had trouble
getting an embedded Lua hello world C program working.
All of the examples I found on the internet didn't work for me.
I'd also suggest including the command line to compile,
as that was also not obvious. Below is what worked for
me on my Linux box.
Make the linux version:
$ make linux
then you can simplify your command line
Add the hello_world.c program below to the root of lua source tree
$ gcc hello_world.c -o hello_world -I src/ -L src -llua -ldl -lm
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia