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

Linux [COMPILING UBUNTU 18] Many errors when compile

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,403
Solutions
17
Reaction score
151
Location
Brazil
Im trying to compile OTX2 on Ubuntu 18, but got this error when try to compile. Anyone can help me, please?
1641990150418.png

otserv.cpp attached
 

Attachments

Try attached file. It looks like there was #endif in wrong place and it tried to compile 'Windows only' code on Linux.

If after changes you still have problems with compilation, post your whole source folder, so I can try to compile it and fix errors.
 

Attachments

Try attached file. It looks like there was #endif in wrong place and it tried to compile 'Windows only' code on Linux.

If after changes you still have problems with compilation, post your whole source folder, so I can try to compile it and fix errors.
i've got, now getting this erron on compiling is finishing:
Post automatically merged:

follow my sources folder
 

Attachments

configure.ac misses lines for GMP library:
Code:
# check for gmp
AC_CHECK_HEADERS([gmp.h], ,[AC_MSG_ERROR("gmp header not found.")])
AC_CHECK_LIB(gmp, __gmpz_init2, ,[AC_MSG_ERROR("Linking against gmp library failed.")])

Makefile.am has duplicated 3 lines with .cpp files list:
Code:
theotxserver_SOURCES = rsa.cpp rsa.h account.h actions.cpp actions.h  baseevents.cpp baseevents.h beds.cpp \
   beds.h chat.cpp chat.h combat.cpp combat.h condition.cpp condition.h \
   config.h configmanager.cpp configmanager.h connection.cpp connection.h \
   const.h container.cpp container.h creature.cpp creature.h \
HERE ->   beds.h chat.cpp chat.h combat.cpp combat.h condition.cpp condition.h \
HERE ->   config.h configmanager.cpp configmanager.h connection.cpp connection.h \
HERE ->   const.h container.cpp container.h creature.cpp creature.h \
   creatureevent.cpp creatureevent.h cylinder.cpp cylinder.h database.cpp \
This part:
Code:
   beds.h chat.cpp chat.h combat.cpp combat.h condition.cpp condition.h \
   config.h configmanager.cpp configmanager.h connection.cpp connection.h \
   const.h container.cpp container.h creature.cpp creature.h \
is there 2 times. Linker find function duplicates and fails. Remove these 3 lines and it will compile.

Cleanup source folder and compile again:
Code:
rm *
sh autogen.
./configure --enable-mys
make -j $(nproc)
 
Back
Top