Malkverbena / mysql

MySQL connector to Godot Engine.
59 stars 7 forks source link

Problems with compiling in Godot (master branch) #5

Closed zenogears closed 4 years ago

zenogears commented 4 years ago
scons: done reading SConscript files.
scons: Building targets ...
[Initial build] Compiling ==> modules/MySQL/MySQL.cpp
In file included from /usr/include/cppconn/variant.h:38:0,
                 from /usr/include/cppconn/connection.h:35,
                 from /usr/include/cppconn/driver.h:30,
                 from /usr/include/mysql_driver.h:32,
                 from modules/MySQL/MySQL.h:8,
                 from modules/MySQL/MySQL.cpp:3:
/usr/include/cppconn/exception.h:100:2: error: ISO C++1z does not allow dynamic exception specifications
  MEMORY_ALLOC_OPERATORS(SQLException)
  ^
/usr/include/cppconn/exception.h:100:2: error: ISO C++1z does not allow dynamic exception specifications
  MEMORY_ALLOC_OPERATORS(SQLException)
  ^
modules/MySQL/MySQL.cpp: In member function 'Array MySQL::make_query(String, int, Array, bool)':
modules/MySQL/MySQL.cpp:198:25: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       for (int i = 1; i <= res_meta->getColumnCount(); i++)
                       ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
modules/MySQL/MySQL.cpp:206:25: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
       for (int i = 1; i <= res_meta->getColumnCount(); i++)
                       ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
modules/MySQL/MySQL.cpp:222:24: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
      for (int i = 1; i <= res_meta->getColumnCount(); i++)
                      ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
modules/MySQL/MySQL.cpp: In member function 'void MySQL::determine_datatype(std::shared_ptr<sql::PreparedStatement>, Array)':
modules/MySQL/MySQL.cpp:366:48: error: 'REAL' is not a member of 'Variant'
   else if ( prep_val[i].get_type() == Variant::REAL) { prep_stmt->setDouble(d, float(prep_val[i])); }
                                                ^~~~
cc1plus: all warnings being treated as errors
scons: *** [modules/MySQL/MySQL.linuxbsd.tools.64.o] Error 1
scons: building terminated because of errors.
Malkverbena commented 4 years ago

Здравствуй, I can't reproduce this error on 3.2`s branch. Everything works fine to me. However, this error occurs in branch 4.0 due to the modifications that were made to the engine. Make sure you are trying to compile for branch 3.2, not the master. I plan to start working on a version for Godot 4 when the engine becomes more stable.

zenogears commented 4 years ago

Привет, Yes, youre right. It was master-branch. 3.2 compiles perfectly well. Waiting for 4.0 mysql plugin. Thanks.

Malkverbena commented 4 years ago

I just added support for Godot 4. Now I believe you can compile it without errors. Remember to define your SCsub file correctly.