Jump to content
  • Advertisement
Sign in to follow this  
Sevay86

Dev-C++ Makefile error

This topic is 4065 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'm trying the lua scripting template in dev-c++, and I get this error: C:\Dev-Cpp\Makefile.win [Build Error] [Project1.exe] Error 1 Here's the code: #include <iostream> extern "C" { #include "lua.h" #include "lualib.h" #include "lauxlib.h" } void report_errors(lua_State *L, int status) { if ( status!=0 ) { std::cerr << "-- " << lua_tostring(L, -1) << std::endl; lua_pop(L, 1); // remove error message } } int main(int argc, char** argv) { char * file = "hello.lua"; // file to load //REMEMBER!!!! "hello.lua" cant be compiled!!!! lua_State *L = lua_open(); luaopen_io(L); // provides io.* luaopen_base(L); luaopen_table(L); luaopen_string(L); luaopen_math(L); luaopen_loadlib(L); std::cerr << "-- Loading file: " << file << std::endl; int s = luaL_loadfile(L, file); if ( s==0 ) { // execute Lua program s = lua_pcall(L, 0, LUA_MULTRET, 0); } report_errors(L, s); lua_close(L); system("pause"); //pause to show the result... std::cerr << std::endl; return 0; } Here's the linkers: -lLua -lLualib -lmingw32 -lSDL -lSDLmain -mwindows lib/liblua.a lib/liblualib.a Thanks!

Share this post


Link to post
Share on other sites
Advertisement
If it's a build error, it should tell you what line it's broken on.

But it might be that you don't have the lib directory of your lua libs in your ide settings (unless you copied the lua stuff into dev-cpp's 'lib' directory or something...)

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!