• 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 error: 'my_bool' was not declared in this scope

nurgiel

New Member
Joined
Jul 5, 2008
Messages
43
Solutions
2
Reaction score
1
Location
Poland
Hi.
First of all sorry for shitty gramar and mistakes.
2nd i back to tibia after 10 years and i tried to install the latest TFS ver from github (its 2.0?).
I bought VPS with debian 9.0. I totally noobs with linux command so you need to talk to my like to noob
after compiling i get this errors. If someone can tell, what to do, would be great.
other info.
mysql Ver 8.0.11 for Linux on x86_64

Code:
[  1%] Generating CXX prefix source cotire/tfs_CXX_prefix.cxx
[  2%] Generating CXX prefix header cotire/tfs_CXX_prefix.hxx
[  3%] Building CXX precompiled header cotire/tfs_CXX_prefix.hxx.gch
Scanning dependencies of target tfs
[  5%] Building CXX object CMakeFiles/tfs.dir/src/otpch.cpp.o
[  6%] Building CXX object CMakeFiles/tfs.dir/src/actions.cpp.o
[  7%] Building CXX object CMakeFiles/tfs.dir/src/ban.cpp.o
[  8%] Building CXX object CMakeFiles/tfs.dir/src/baseevents.cpp.o
[ 10%] Building CXX object CMakeFiles/tfs.dir/src/bed.cpp.o
[ 11%] Building CXX object CMakeFiles/tfs.dir/src/chat.cpp.o
[ 12%] Building CXX object CMakeFiles/tfs.dir/src/combat.cpp.o
[ 13%] Building CXX object CMakeFiles/tfs.dir/src/condition.cpp.o
[ 15%] Building CXX object CMakeFiles/tfs.dir/src/configmanager.cpp.o
[ 16%] Building CXX object CMakeFiles/tfs.dir/src/connection.cpp.o
[ 17%] Building CXX object CMakeFiles/tfs.dir/src/container.cpp.o
[ 18%] Building CXX object CMakeFiles/tfs.dir/src/creature.cpp.o
[ 20%] Building CXX object CMakeFiles/tfs.dir/src/creatureevent.cpp.o
[ 21%] Building CXX object CMakeFiles/tfs.dir/src/cylinder.cpp.o
[ 22%] Building CXX object CMakeFiles/tfs.dir/src/database.cpp.o
/var/www/oblivionots/src/database.cpp: In member function 'bool Database::connect()':
/var/www/oblivionots/src/database.cpp:46:2: error: 'my_bool' was not declared in this scope
  my_bool reconnect = true;
  ^~~~~~~
/var/www/oblivionots/src/database.cpp:47:46: error: 'reconnect' was not declared in this scope
  mysql_options(handle, MYSQL_OPT_RECONNECT, &reconnect);
                                              ^~~~~~~~~
CMakeFiles/tfs.dir/build.make:426: recipe for target 'CMakeFiles/tfs.dir/src/database.cpp.o' failed
make[2]: *** [CMakeFiles/tfs.dir/src/database.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tfs.dir/all' failed
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
 
Last edited:
I dont really know exactlly the problem, but installation goes successfully on debian 8, so problem is with debian 9. maybe its depend of php version, that on debian 9 is php7
 
This issue only affects MySQL; MariaDB will continue to support my_bool.

The following build error occurs when attempting to compile with MySQL 8.0.1:

motion.c: In function ‘motion_init’:
motion.c:1146:13: error: unknown type name ‘my_bool’; did you mean ‘bool’?
1146 | my_bool my_true = TRUE;
| ^~~~~~~
| bool
make: *** [Makefile:105: motion.o] Error 1
make: *** Waiting for unfinished jobs....
Noted in 8.0.1 changelog (MySQL :: MySQL 8.0 Release Notes :: Changes in MySQL 8.0.1 (2017-04-10, Development Milestone) (https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html#mysqld-8-0-1-compiling)):

The mysql.h header file now requires a C++ or C99 compiler to
compile.

The my_bool type is no longer used in MySQL source code. Any third-party code that used this type to represent C boolean variables should use the bool or int C type instead.
 
Back
Top