You have to add to project all *.cpp and *.h files, then press Alt + P, I guess, it will open the definitions menu, you have to write there every "-D" in the middle box, and on the very left box you have to add all linkers (eg. -llua5.1). When you are done press F6, not sure about this tho, just look for Compile ^^...