• Advertisement
Sign in to follow this  

I need help to setup Dev-C++ to lua

This topic is 4391 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need help setting up the file. I am new at this program. I know it need this lib. #include <lualib.h> #include <lua.h> Can any one help me set up the file and the locations to run lua from Dev-C++?

Share this post


Link to post
Share on other sites
Advertisement
I have never used lua, and I don't even have dev cpp, but I CAN do a mean google search :). Try this out:

http://lua-users.org/wiki/BuildingLua

Share this post


Link to post
Share on other sites
It not working.
I got this error.
syntax error near unexpected token `('
`gcc.exe -c ../src/lzio.c -o ../src/lzio.o -I"C:/Dev-Cpp/include" -I"../include" -DLUA_API=__declspec(dllexport) -DUSE_FASTROUND '
C:\Dev-Cpp\devcpp\Makefile.win [Build Error] [../src/lzio.o] Error 2

Share this post


Link to post
Share on other sites
Quote:
Original post by Darknetster
It not working.
I got this error.
syntax error near unexpected token `('
`gcc.exe -c ../src/lzio.c -o ../src/lzio.o -I"C:/Dev-Cpp/include" -I"../include" -DLUA_API=__declspec(dllexport) -DUSE_FASTROUND '
C:\Dev-Cpp\devcpp\Makefile.win [Build Error] [../src/lzio.o] Error 2


Is the error in your code? If so, what is on (and near) that line?

Share this post


Link to post
Share on other sites
Quote:
Original post by Darknetster
Can any one help me set up the file and the locations to run lua from Dev-C++?


If you open DevCpp and go to "Tools->Check for Updates/Packages", then choose "devpaks.org Community Devpaks" for the "Select devpak server", then hit the "Check For Updates" button in the bottom left corner, you will get a list of avaliable packages to download and install for DevCpp. Towards the top there should be an entry for "Lua" that you can select to download and install. Alternatively, you can download the .DevPak file here and double click to install it.

Once you have it installed, click File->New->Project and in the new dialog choose the Lua Tab. Click on the Lua project Icon, name your project and hit Ok. Choose where to save the project file and you will now be in the DevCpp IDE with two main files open. "Main.cpp" and "hello.lua.cpp"

You will first need to rename the "hello.lua.cpp" file to "hello.lua", or make the change in the main.cpp file. Next, you will need to remove that hello.lua file from the workspace. Now you can compile and build the project and it will work! I tried it out to be sure and had no problems with it. If you run into any more troubles, let us know. Good luck!

Share this post


Link to post
Share on other sites
Quote:
Original post by Darknetster
Sweet Thanks. Will this work for window app.? That I am trying to get it in the window.


Yes, it should, you just have to make a Win32 GUI rather than the Console when you first create the project. Just note that the provide example will not work since it simply prints to the console [wink]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement