Giter Site home page Giter Site logo

Comments (1)

SClerckx avatar SClerckx commented on September 7, 2024 1

Replicated this issue and solved on this setup: Windows 11, Visual Studio 22, MSVC 14.37 CXX 14 and 17 Standard.

encoding.h and logical_buffer.h are from libnop. The compile error occurs if #include<windows.h> is declared before #include <depthai/depthai.hpp>. The ::min() and ::max() from windows.h conflict with those present in libnop. This might also happen if other dependencies include widows.h on their end.

The fast workaround is to include depthai before windows.h, or #define NOMINMAX before including widows.h.

My compile errors when the issue is present:

encoding.h(475): error C2589: '(': illegal token on right side of '::'
encoding.h(475): error C2062: type 'unknown-type' unexpected
encoding.h(475): error C2589: '(': illegal token on right side of '::'
encoding.h(475): error C2059: syntax error: ')'
encoding.h(475): error C2059: syntax error: ')'
encoding.h(477): error C2181: illegal else without matching if
encoding.h(618): error C2589: '(': illegal token on right side of '::'
encoding.h(618): error C2062: type 'unknown-type' unexpected
encoding.h(618): error C2589: '(': illegal token on right side of '::'
encoding.h(618): error C2059: syntax error: ')'
encoding.h(618): error C2059: syntax error: ')'
encoding.h(620): error C2181: illegal else without matching if
encoding.h(620): error C2589: '(': illegal token on right side of '::'
encoding.h(620): error C2062: type 'unknown-type' unexpected
encoding.h(620): error C2589: '(': illegal token on right side of '::'
encoding.h(620): error C2059: syntax error: ')'
encoding.h(620): error C2059: syntax error: ')'
encoding.h(622): error C2181: illegal else without matching if
encoding.h(781): error C2589: '(': illegal token on right side of '::'
encoding.h(781): error C2062: type 'unknown-type' unexpected
encoding.h(781): error C2589: '(': illegal token on right side of '::'
encoding.h(781): error C2059: syntax error: ')'
encoding.h(781): error C2059: syntax error: ')'
encoding.h(783): error C2181: illegal else without matching if
encoding.h(783): error C2589: '(': illegal token on right side of '::'
encoding.h(783): error C2062: type 'unknown-type' unexpected
encoding.h(783): error C2589: '(': illegal token on right side of '::'
encoding.h(783): error C2059: syntax error: ')'
encoding.h(783): error C2059: syntax error: ')'
encoding.h(785): error C2181: illegal else without matching if
encoding.h(785): error C2589: '(': illegal token on right side of '::'
encoding.h(785): error C2062: type 'unknown-type' unexpected
encoding.h(785): error C2589: '(': illegal token on right side of '::'
encoding.h(785): error C2059: syntax error: ')'
encoding.h(785): error C2059: syntax error: ')'
encoding.h(787): error C2181: illegal else without matching if
logical_buffer.h(62): error C2589: '(': illegal token on right side of '::'
logical_buffer.h(62): error C2059: syntax error: ')'
logical_buffer.h(62): error C2334: unexpected token(s) preceding ':'; skipping apparent function body
logical_buffer.h(65): error C2143: syntax error: missing ')' before ';'
logical_buffer.h(65): error C2059: syntax error: ')'
logical_buffer.h(65): error C2238: unexpected token(s) preceding ';'
logical_buffer.h(65): fatal error C1201: unable to continue after syntax error in class template definition

from depthai-core.

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.