Uploaded image for project: 'MariaDB Connector/C++'
  1. MariaDB Connector/C++
  2. CONCPP-114

Building MariaDbDriver.cpp error: expected identifier before numeric constant _NULL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 1.1.2
    • N/A
    • General
    • None
    • Windows 10, under Cygwin using gcc version 11.4.0

    Description

      Building CXX object CMakeFiles/mariadbcpp.dir/src/MariaDbDriver.cpp.o

      In file included from /usr/include/wchar.h:6,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/cwchar:44,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/postypes.h:40,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iosfwd:40,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/shared_ptr.h:52,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/memory:77,
      from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/MariaDbDriver.h:24,
      from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/MariaDbDriver.cpp:21:
      /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/include/conncpp/Types.hpp:49:5: error: expected identifier before numeric constant
      49 | _NULL,

      ^~~~~
      /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/include/conncpp/Types.hpp:49:5: error: expected ‘}’ before numeric constant
      In file included from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/include/conncpp.hpp:36,
      from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/options/Options.h:27,
      from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/UrlParser.h:27,
      from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/MariaDbDriver.cpp:23:
      /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/include/conncpp/Types.hpp:27:14: note: to match this ‘{’
      27
      enum Types { | ^ In file included from /usr/include/wchar.h:6, from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/cwchar:44, from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/postypes.h:40, from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iosfwd:40, from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/shared_ptr.h:52, from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/memory:77, from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/MariaDbDriver.h:24, from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/MariaDbDriver.cpp:21: /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/include/conncpp/Types.hpp:49:5: error: expected unqualified-id before numeric constant 49 | _NULL, | ^~~~~ In file included from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/include/conncpp.hpp:36, from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/options/Options.h:27, from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/UrlParser.h:27, from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/MariaDbDriver.cpp:23: /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/include/conncpp/Types.hpp:70:16: error: use of enum ‘Types’ without previous declaration 70 | typedef enum Types DataType; | ^~~~~ /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/include/conncpp/Types.hpp:71:1: error: expected declaration before ‘}

      ’ token
      71

      }
      ^
      In file included from /usr/include/wchar.h:6,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/cwchar:44,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/postypes.h:40,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iosfwd:40,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/shared_ptr.h:52,
      from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/memory:77,
      from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/MariaDbDriver.h:24,
      from /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/MariaDbDriver.cpp:21:
      /cygdrive/D/GIT-repository/mariadbC++/mariadb-connector-cpp/src/ColumnType.h:50:27: error: expected unqualified-id before numeric constant
      50
      static const ColumnType _NULL;
      ^~~~~
      make[2]: *** [CMakeFiles/mariadbcpp.dir/build.make:76: CMakeFiles/mariadbcpp.dir/src/MariaDbDriver.cpp.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:419: CMakeFiles/mariadbcpp.dir/all] Error 2
      make: *** [Makefile:156: all] Error 2

      Attachments

        Activity

          People

            Lawrin Lawrin Novitsky
            al980 Alan Leurck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.