这是我的dev-CPP编译器日志:编译链接LUA5.1 Lib。错误DEV-CPP
rm -f main.o luaTest.exe'
gcc.exe -c main.c -o main.o -I"E:/Dev-Cpp/include" -I"E:/Lua/5.1/include"'
gcc.exe main.o -o "luaTest.exe" -L"E:/Dev-Cpp/lib" -L "E:/lua/5.1/lua5.1.lib"'
main.o(.text+0x34):main.c: undefined reference to 'luaL_newstate'
main.o(.text+0x48):main.c: undefined reference to 'luaL_openlibs'
main.o(.text+0xab):main.c: undefined reference to 'luaL_loadbuffer'
main.o(.text+0xd5):main.c: undefined reference to 'lua_pcall'
main.o(.text+0x11c):main.c: undefined reference to 'lua_tolstring'
main.o(.text+0x14e):main.c: undefined reference to 'lua_settop'
main.o(.text+0x161):main.c: undefined reference to 'lua_close'
collect2: ld returned 1 exit status'
make.exe: *** [luaTest.exe] Error 1'
我可以在编译&链接我的代码的成功与代码::块。我无法弄清楚dev-cpp有什么问题。
为什么你坚持使用DEV-CPP关闭生成makefile DEV-cpp.when?这是一个可怕的过时/被忽视的工具。正如你已经发现的,Code :: Blocks是无限优越的。现在删除dev-cpp。 :] – TheBuzzSaw
我完全同意。甚至在标签的信息中。 – Bart