• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Dev-Cpp needs lua.h

scriptha

On a distinguished road
Joined
Jul 21, 2007
Messages
125
Reaction score
0
Location
/etc/pr0n
As the title says, when I try to compile the latest tfs, it says
Code:
In file included from creatureevent.h:24,
                 from creature.h:33,
                 from player.h:25,
                 from actions.cpp:24:
luascript.h:30:18: lua.h: No such file or directory
I've downloaded the dev-cpp pack talaturen supplied..

help :O

and there are more errors, but they might be fixed when lua.h is found:
Code:
In file included from creatureevent.h:24,
                 from creature.h:33,
                 from player.h:25,
                 from actions.cpp:24:
luascript.h:32: warning: `luaopen_luasql_mysql' initialized and declared `extern'

luascript.h:32: error: `lua_State' was not declared in this scope
luascript.h:32: error: expected primary-expression before ')' token

luascript.h:40:22: lauxlib.h: No such file or directory
luascript.h:41:21: lualib.h: No such file or directory
luascript.h:281: error: ISO C++ forbids declaration of `lua_State' with no type
luascript.h:281: error: expected `;' before '*' token
luascript.h:283: error: expected `;' before "bool"
luascript.h:288: error: variable or field `pushThing' declared void
luascript.h:288: error: expected `;' before '(' token
luascript.h:289: error: variable or field `pushVariant' declared void

luascript.h:289: error: expected `;' before '(' token
luascript.h:290: error: variable or field `pushPosition' declared void
luascript.h:290: error: expected `;' before '(' token
luascript.h:291: error: variable or field `pushPosition' declared void
luascript.h:291: error: expected `;' before '(' token
luascript.h:293: error: expected `;' before '(' token
luascript.h:294: error: variable or field `popPosition' declared void
luascript.h:294: error: expected `;' before '(' token
luascript.h:295: error: variable or field `popPosition' declared void
luascript.h:295: error: expected `;' before '(' token
luascript.h:296: error: expected `;' before '(' token
luascript.h:297: error: expected `;' before '(' token
luascript.h:298: error: expected `;' before '(' token
luascript.h:300: error: expected `;' before '(' token
luascript.h:301: error: variable or field `setField' declared void
luascript.h:301: error: expected `;' before '(' token
luascript.h:302: error: variable or field `setField' declared void

luascript.h:302: error: expected `;' before '(' token
luascript.h:302: error: expected `;' before '(' token continues for about 200 lines, but with a different line number ofc.
 
some parts are fixed, its
Code:
C:/Dev-Cpp/lib/lua5.1.dll -lmysql -lwsock32 -lgmp -lsqlite3 -lregex -s  

luascript.o(.text+0x2eb2):luascript.cpp: undefined reference to `luaopen_luasql_mysql'
collect2: ld returned 1 exit status

make.exe: *** [theforgottenserver.exe] Error 1
now :/
 
Do a rebuild all and make sure you got these linkers:
Code:
-lgmp
-lluasql-mysql
-lluasql-sqlite3
-llua5.1
-lmysql
-lregex
-lsqlite3
-lwsock32
-lxml2
-lmysql
-s
 
Got a new error, on ubuntu this time

connection.h:25:26: error: boost/asio.hpp: Could not find file
(the error is translated)

Its included from connection.h, #include <boost/asio.hpp> if that matters..
 
Linkers? I'm just using make in terminal. or in the makefile?
edit:
my linkers in Makefile:
LIBLINK = -L/usr/lib -lxml2 -lpthread -llua5.1 -lboost_thread -lgmp -lmysqlclient -lboost_regex -lsqlite3 -llua5.1-sql-mysql -llua5.1-sql-sqlite -ldl -lboost_system -lasio
still the same error.
 
Last edited:
Use this linkers and try again.
Code:
-llibxml2
-llua
-llualib
-lwsock32
-lsqlite3
-lmysql
-lluasql-mysql
-lluasql-sqlite3
-lregex
-lgmp
-lws2_32
-lasio
-s
 
I don't think linux needs wsock, I think w stands for windows..
 
I don't think linux needs wsock, I think w stands for windows..

for linux, you need to link to the berkely sockets library (and maybe the AIO library, boost.asio might use that if its available).
 

Similar threads

Replies
2
Views
621
Back
Top