Giter VIP home page Giter VIP logo

Comments (4)

neslib avatar neslib commented on May 24, 2024

C doesn't have native support for bool. So the header file must include <stdbool.h> (or another include file that includes <stdbool.h>

from chet.

michkowalczuk avatar michkowalczuk commented on May 24, 2024

After adding #include <stdbool.h> to the source code I get the following list of errors:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\yvals_core.h:29:2: error: Error in C++ Standard Library usage
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\xkeycheck.h:54:2: error: The C++ Standard Library forbids macroizing the keyword "bool". Enable warning C4005 to find the forbidden define.
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\xkeycheck.h:234:2: error: The C++ Standard Library forbids macroizing the keyword "false". Enable warning C4005 to find the forbidden define.
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\xkeycheck.h:439:2: error: The C++ Standard Library forbids macroizing the keyword "true". Enable warning C4005 to find the forbidden define.
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\yvals_core.h:829:1: error: use of undeclared identifier 'EMIT'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cstdint:21:1: error: unknown type name 'namespace'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cstdint:21:1: error: expected ';' after top level declarator
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cstdlib:23:62: error: expected function body after function declarator
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cstdio:33:1: error: unknown type name 'namespace'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cstdio:33:1: error: expected ';' after top level declarator
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cwchar:22:1: error: unknown type name 'using'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cwchar:22:19: error: unexpected type name 'mbstate_t': expected expression
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cwchar:24:1: error: unknown type name 'namespace'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\cwchar:24:1: error: expected ';' after top level declarator
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\limits:37:1: error: unknown type name 'namespace'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\limits:37:1: error: expected ';' after top level declarator
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\yvals.h:346:1: error: unknown type name 'namespace'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\yvals.h:346:1: error: expected ';' after top level declarator
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\vcruntime_exception.h:28:5: error: unknown type name 'EMIT'

from chet.

neslib avatar neslib commented on May 24, 2024

If I create a header file with the #include <stdbool.h> and your sample struct, it translates just fine.
The errors seems to indicate that the header files use C++ instead of C. Chet only works with C.

from chet.

michkowalczuk avatar michkowalczuk commented on May 24, 2024

Thank you. I found that a few of headers use C++ code.

from chet.

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.