Comments (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)
- [BUG] Will not generate ninja compile files with external compiled xlink directory HOT 1
- [BUG] depthai-core.dll will not link HOT 9
- [BUG] host get wrong message from outputQueue HOT 2
- [BUG] {Segfault using the same camera stream for two different xlink outs} HOT 1
- [BUG] Pipeline crash when undistorting color image using Camera Node HOT 8
- [BUG] Not able to get video when using stereo pipeline HOT 2
- device->addLogCallback() doesn't work for bootloader warnings
- can't get factory bootloader version when running user bootloader
- [BUG] Noisy point clouds near the bottom-right corner of OAK-D PRO camera HOT 2
- oak-d-pro-poe shutdown after a while HOT 1
- New xlink version HOT 3
- Libnop C++20 Bug HOT 5
- [BUG] Alternate between dot projector and illumination LED when adjust the image frame rate to 60Hz
- `isUserBootloader()` fails to check conditions correctly
- [BUG] OAK-D-POE intermittent failure - INTERNAL_ERROR_CORE HOT 4
- CLOCK_REALTIME should be CLOCK_MONOTONIC
- depthai-core deadlocked in semaphores with OAK-D-Pro-PoE after 100+ connections, HOT 3
- Depthai-core dependencies not built with -fPIC HOT 11
- Undistortion of ColorCamera node
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from depthai-core.