Your first program

Walkthrough ››
Parent Previous Next

Your first program


I guess your first program would have to be the ubiquitous "Hello World".


If you think it kinda sucks you may want to skip to the next tutorial :-)


If not, so open up a file in the directory you extracted this archive to (normally named "murgaLua").


And type the following :



       fltk.fl_message("Hello Word")

       print("Hello World")



Save the file as "helloWorld.lua", and then run at the prompt :



       bin/murgaLua helloWorld.lua



REMEMBER - If you are running in Windows the slash ("/") goes the other way, so do "bin\murgaLua".


Anyway, you'll see a nice FLTK message box with "Hello World", and the same on the standard Lua console output.


Linux users may want to copy "murgaLua" to "/usr/bin", and put the following as the first line of the program :



       #!/usr/bin/murgaLua