lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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

make install

then you can simplify your command line

Add the hello_world.c program below to the root of lua source tree
and compile:
  $ gcc hello_world.c -o hello_world -I src/ -L src -llua -ldl -lm

Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia