[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Simple embedded hello world C example for 5.1
- From: Wink Saville <wink@...>
- Date: Tue, 8 Jun 2010 20:12:49 -0700
Yes, I actually had that but thought it was more straight forward
to not to have to do the install. But for completeness
after the "make install" the command line is:
$ gcc hello_world.c -o hello_world -llua -ldl -lm
On Tue, Jun 8, 2010 at 6:40 PM, KHMan <email@example.com>
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