Code Monkey home page Code Monkey logo

Comments (1)

sonictl avatar sonictl commented on May 27, 2024

The error info given by compiler:

In file included from ../components/MPUdriver/include/MPU.hpp:39,
                 from ../main/main.c:26:
../components/I2Cbus/include/I2Cbus.hpp:36:1: error: unknown type name 'namespace'
 namespace i2cbus {
 ^~~~~~~~~
../components/I2Cbus/include/I2Cbus.hpp:36:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 namespace i2cbus {
                  ^
../components/I2Cbus/include/I2Cbus.hpp:43:1: error: unknown type name 'using'; did you mean 'ulong'?
 using I2C_t = i2cbus::I2C;
 ^~~~~
 ulong
../components/I2Cbus/include/I2Cbus.hpp:43:15: error: 'i2cbus' undeclared here (not in a function)
 using I2C_t = i2cbus::I2C;
               ^~~~~~
../components/I2Cbus/include/I2Cbus.hpp:43:21: error: expected ',' or ';' before ':' token
 using I2C_t = i2cbus::I2C;
                     ^
../components/I2Cbus/include/I2Cbus.hpp:46:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'i2c0'
 extern I2C_t i2c0;        /*!< port: I2C_NUM_0 */
              ^~~~
../components/I2Cbus/include/I2Cbus.hpp:47:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'i2c1'
 extern I2C_t i2c1;        /*!< port: I2C_NUM_1 */
              ^~~~
../components/I2Cbus/include/I2Cbus.hpp:51:1: error: unknown type name 'namespace'
 namespace i2cbus {
 ^~~~~~~~~
../components/I2Cbus/include/I2Cbus.hpp:51:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 namespace i2cbus {
                  ^
In file included from ../components/MPUdriver/include/MPU.hpp:39,
                 from ../main/main.c:26:
../components/I2Cbus/include/I2Cbus.hpp:159:1: error: unknown type name 'constexpr'; did you mean 'const'?
 constexpr I2C_t& getI2C(i2c_port_t port) {
 ^~~~~~~~~
 const
../components/I2Cbus/include/I2Cbus.hpp:159:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '&' token
 constexpr I2C_t& getI2C(i2c_port_t port) {
                ^
In file included from ../components/MPUdriver/include/mpu/types.hpp:16,
                 from ../components/MPUdriver/include/MPU.hpp:52,
                 from ../main/main.c:26:
../components/MPUdriver/include/mpu/registers.hpp:19:1: error: unknown type name 'namespace'
 namespace mpud
 ^~~~~~~~~
../components/MPUdriver/include/mpu/registers.hpp:20:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
In file included from ../components/MPUdriver/include/MPU.hpp:52,
                 from ../main/main.c:26:
../components/MPUdriver/include/mpu/types.hpp:20:1: error: unknown type name 'namespace'
 namespace mpud
 ^~~~~~~~~
../components/MPUdriver/include/mpu/types.hpp:21:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
In file included from ../main/main.c:26:
../components/MPUdriver/include/MPU.hpp:55:1: error: unknown type name 'namespace'
 namespace mpud
 ^~~~~~~~~
../components/MPUdriver/include/MPU.hpp:56:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
../components/MPUdriver/include/MPU.hpp:61:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
 typedef mpud::MPU MPU_t;
             ^
../components/MPUdriver/include/MPU.hpp:63:1: error: unknown type name 'namespace'
 namespace mpud
 ^~~~~~~~~
../components/MPUdriver/include/MPU.hpp:64:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
../components/MPUdriver/include/MPU.hpp:263:1: error: unknown type name 'namespace'
 namespace mpud
 ^~~~~~~~~
../components/MPUdriver/include/MPU.hpp:264:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
In file included from ../main/main.c:27:
../components/MPUdriver/include/mpu/math.hpp:21:1: error: unknown type name 'namespace'
 namespace mpud
 ^~~~~~~~~
../components/MPUdriver/include/mpu/math.hpp:22:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
../main/main.c: In function 'app_main':
../main/main.c:39:12: error: 'myI2C' undeclared (first use in this function)
     I2C_t& myI2C = i2c0;  // i2c0 and i2c1 are the default objects
            ^~~~~
../main/main.c:39:12: note: each undeclared identifier is reported only once for each function it appears in
../main/main.c:39:20: error: 'i2c0' undeclared (first use in this function)
     I2C_t& myI2C = i2c0;  // i2c0 and i2c1 are the default objects
                    ^~~~

from esp32-mpu-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.