• 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!

Compiling Linux compiling problems

Wraskly

Member
Joined
Jun 17, 2010
Messages
244
Reaction score
7
I can compile 0.4 fine, everything works, but when i try to compile 0.2 i get many errors, and i CANNOT figure out what the problem is. so can someone tell me how i could fix this issue please?

Code:
 g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/creature.o creature.cpp

it has this error with all types. like this

Code:
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/creatureevent.o creatureevent.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/chat.o chat.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/combat.o combat.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/commands.o commands.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/condition.o condition.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/configmanager.o configmanager.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/connection.o connection.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/container.o container.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/cylinder.o cylinder.cpp
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_SQLITE__ -Werror -Wall -O2 -o obj/database.o database.cpp
In file included from database.cpp:34:0:
databasesqlite.h:24:21: fatal error: sqlite3.h: No such file or directory
compilation terminated.
 
Why are you compiling with BOTH sqlite and mysql? Your only going to use one of them?
 
I'd like to just use mysql, i just download linux yesterday, so i have not a CLUE what im doing, lol ive just been following tutorials.
 
I think he is using the default Make which automatically puts both flags in there.

Try editing your Makefile and where is says: FLAGS = -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__

Change to: FLAGS = -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__

I don't think you'll have to edit the ifdef statement, but if you still get this error, remove -D__USE_SQLITE__ from the flag lines in the Makefile
 
I just tried everything you just told me to do, and its giving me this error still.

Code:
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_MYSQL__ -Werror -Wall -O2 -o obj/game.o game.cpp
 
the flag -D__USE_MYSQL__ is defined 2 times in your latest code output.

Do you still get "Compilation Terminated" error? What does the lines above say?
 
~/0.2$ make
g++ -c -I"." -I"/usr/include/libxml2" -I"/usr/include/lua5.1" -I"/usr/include/mysql" -D_THREAD_SAFE -D_REENTRANT -D__NO_HOMEDIR_CONF__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__USE_MYSQL__ -D__USE_MYSQL__ -Werror -Wall -O2 -o obj/house.o house.cpp

thats all it says
 
damn im dumb haha those werent errors like cyco said :p thanks for clarifying that for me cyco, everything works perfect now, except this:


Code:
 Checking world type... PVP
>> Loading map
> Map size: 1000x1000.
> Map loading time: 4.242 seconds.
Notice: Map load (Komic) took: 0.036 s
>> Initializing gamestate
[ServicePort::open] Error: Permission denied
ERROR: status protocol and gameworld protocol cannot use the same port 7171.
>> Loaded all modules, server starting up...
>> Forgotten Server Online!

[ServicePort::open] Error: Permission denied
[ServicePort::open] Error: Permission denied
[ServicePort::open] Error: Permission denied
^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A[ServicePort::open] Error: Permission denied
 
Back
Top