Sign in to follow this  
Darknetster

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

Recommended Posts

Darknetster    122
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
Darknetster    122
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
Roboguy    794
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
Drew_Benton    1861
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
Drew_Benton    1861
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this