luxonis / depthai-core

DepthAI C++ Library
MIT License
234 stars 127 forks source link

[BUG] Can't compile on windows : error related to libnop #1088

Open masterchef8 opened 2 months ago

masterchef8 commented 2 months ago

Hi, I'd like to report a bug when compiling depthai-core, depthai-unity or any project except the depthai-core-cpp example when on Windows 11 with MSCV 17 2022 (version 1940) (fresh install)

I've tested using cmake / visual studio and also clion

The issue seems to be related to libnop ... I don't know why the depthai-core-cpp example works well ...

thx for your feedbacks or tips :)

Attach system log ====================[ Build | depthai-unity | Debug ]=========================== "C:\Program Files\CMake\bin\cmake.exe" --build C:\Users\coven\Documents\depthai-unity\build --target depthai-unity --config Debug Version MSBuild 17.10.4+10fbfbf2e pour .NET Framework

1>Checking Build System Building Custom Rule C:/Users/coven/Documents/depthai-unity/depthai-core/CMakeLists.txt depthai-resources.vcxproj -> C:\Users\coven\Documents\depthai-unity\build\depthai-core\Debug\depthai-resourcesd.lib Building Custom Rule C:/Users/coven/Documents/depthai-unity/depthai-core/CMakeLists.txt DatatypeEnum.cpp Checksum.cpp Bootloader.cpp Device.cpp DeviceBase.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\DeviceBase.cpp(528,38): warning C4244: 'return'┬á: conversion de '_Rep' en 'unsigned int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\DeviceBase.cpp(528,38): warning C4244: with [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\DeviceBase.cpp(528,38): warning C4244: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\DeviceBase.cpp(528,38): warning C4244: _Rep=int64 [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\DeviceBase.cpp(528,38): warning C4244: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] DeviceBootloader.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\DeviceBootloader.cpp(1561,23): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] DataQueue.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\DataQueue.cpp(47,39): warning C4244: 'initialisation'┬á: conversion de 'int64_t' en 'unsigned int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] CallbackHandler.cpp CalibrationHandler.cpp Version.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\Version.cpp(13,13): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\device\Version.cpp(14,17): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] Pipeline.cpp AssetManager.cpp Node.cpp XLinkIn.cpp XLinkOut.cpp ColorCamera.cpp Camera.cpp ToF.cpp MessageDemux.cpp MonoCamera.cpp G├®n├®ration de code en cours... Compilation en cours... StereoDepth.cpp Sync.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\shared\depthai-shared\include\depthai-shared\properties\SyncProperties.hpp(14,32): warning C4244: 'initialisation'┬á: conversion de 'double' en 'uint64_t', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] NeuralNetwork.cpp ImageManip.cpp Warp.cpp VideoEncoder.cpp DetectionNetwork.cpp Script.cpp SpatialDetectionNetwork.cpp ImageAlign.cpp SystemLogger.cpp SpatialLocationCalculator.cpp AprilTag.cpp ObjectTracker.cpp IMU.cpp EdgeDetector.cpp SPIIn.cpp FeatureTracker.cpp DetectionParser.cpp UVC.cpp G├®n├®ration de code en cours... Compilation en cours... PointCloud.cpp Cast.cpp Buffer.cpp ImgFrame.cpp EncodedFrame.cpp ImageManipConfig.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\ImageManipConfig.cpp(165,13): warning C4244: 'initialisation'┬á: conversion de 'float' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] CameraControl.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(130,54): warning C4244: 'argument'┬á: conversion de '_Rep' en 'uint32_t', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(130,54): warning C4244: with [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(130,54): warning C4244: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(130,54): warning C4244: _Rep=int64 [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(130,54): warning C4244: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(146,48): warning C4244: 'argument'┬á: conversion de '_Rep' en 'uint32_t', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(146,48): warning C4244: with [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(146,48): warning C4244: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(146,48): warning C4244: _Rep=__int64 [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\CameraControl.cpp(146,48): warning C4244: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] NNData.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(68,43): warning C4267: 'argument'┬á: conversion de 'size_t' en '_Ty', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(68,43): warning C4267: with [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(68,43): warning C4267: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(68,43): warning C4267: _Ty=std::_Vbase [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(68,43): warning C4267: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(69,56): warning C4267: 'argument'┬á: conversion de 'size_t' en '_Ty', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(69,56): warning C4267: with [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(69,56): warning C4267: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(69,56): warning C4267: _Ty=std::_Vbase [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(69,56): warning C4267: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(98,43): warning C4267: 'argument'┬á: conversion de 'size_t' en '_Ty', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(98,43): warning C4267: with [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(98,43): warning C4267: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(98,43): warning C4267: _Ty=std::_Vbase [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(98,43): warning C4267: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(99,56): warning C4267: 'argument'┬á: conversion de 'size_t' en '_Ty', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(99,56): warning C4267: with [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(99,56): warning C4267: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(99,56): warning C4267: _Ty=std::_Vbase [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\NNData.cpp(99,56): warning C4267: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] ImgDetections.cpp SpatialImgDetections.cpp SystemInformation.cpp StreamMessageParser.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\StreamMessageParser.cpp(95,55): warning C4267: 'initialisation'┬á: conversion de 'size_t' en 'uint32_t', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\pipeline\datatype\StreamMessageParser.cpp(95,38): warning C4267: 'initialisation'┬á: conversion de 'size_t' en 'const uint32_t', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] SpatialLocationCalculatorData.cpp SpatialLocationCalculatorConfig.cpp AprilTags.cpp AprilTagConfig.cpp Tracklets.cpp IMUData.cpp StereoDepthConfig.cpp EdgeDetectorConfig.cpp G├®n├®ration de code en cours... Compilation en cours... TrackedFeatures.cpp FeatureTrackerConfig.cpp ImageAlignConfig.cpp ToFConfig.cpp PointCloudConfig.cpp PointCloudData.cpp MessageGroup.cpp H26xParsers.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\H26xParsers.cpp(93,15): warning C4267: 'initialisation'┬á: conversion de 'size_t' en 'dai::utility::uint', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\H26xParsers.cpp(109,15): warning C4267: 'initialisation'┬á: conversion de 'size_t' en 'dai::utility::uint', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\H26xParsers.cpp(131,16): warning C4267: 'initialisation'┬á: conversion de 'size_t' en 'dai::utility::ulong', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\H26xParsers.cpp(265,34): warning C4244: 'initialisation'┬á: conversion de 'double' en 'dai::utility::uint', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\H26xParsers.cpp(266,35): warning C4244: 'initialisation'┬á: conversion de 'double' en 'dai::utility::uint', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\H26xParsers.cpp(268,23): warning C4244: 'initialisation'┬á: conversion de 'double' en 'dai::utility::uint', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\H26xParsers.cpp(156,15): warning C4267: 'initialisation'┬á: conversion de 'size_t' en 'dai::utility::uint', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] Initialization.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\Initialization.cpp(86,17): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] Resources.cpp Path.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\Path.cpp(27,29): warning C4996: 'wcsrtombs': This function or variable may be unsafe. Consider using wcsrtombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\Path.cpp(33,32): warning C4996: 'wcsrtombs': This function or variable may be unsafe. Consider using wcsrtombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] Platform.cpp Environment.cpp XLinkGlobalProfilingLogger.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\XLinkGlobalProfilingLogger.cpp(30,31): warning C4244: '/='┬á: conversion de 'float' en 'int64', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\utility\XLinkGlobalProfilingLogger.cpp(31,31): warning C4244: '/='┬á: conversion de 'float' en 'int64', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] Logging.cpp EepromDataParser.cpp LogCollection.cpp XLinkConnection.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\src\xlink\XLinkConnection.cpp(62,5): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\xlink\XLinkConnection.cpp(64,5): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\xlink\XLinkConnection.cpp(325,106): warning C4244: 'argument'┬á: conversion de '_Rep' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\xlink\XLinkConnection.cpp(325,106): warning C4244: with [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\xlink\XLinkConnection.cpp(325,106): warning C4244: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\xlink\XLinkConnection.cpp(325,106): warning C4244: _Rep=__int64 [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] C:\Users\coven\Documents\depthai-unity\depthai-core\src\xlink\XLinkConnection.cpp(325,106): warning C4244: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] XLinkStream.cpp OpenVINO.cpp G├®n├®ration de code en cours... Compilation en cours... BlobReader.cpp G├®n├®ration de code en cours... SBR.c C:\Users\coven\Documents\depthai-unity\depthai-core\shared\depthai-bootloader-shared\src\SBR.c(174,5): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\coven\Documents\depthai-unity\build\depthai-core\depthai-core.vcxproj] bspatch.c G├®n├®ration de code en cours... depthai-core.vcxproj -> C:\Users\coven\Documents\depthai-unity\build\depthai-core\Debug\depthai-cored.lib Building Custom Rule C:/Users/coven/Documents/depthai-unity/depthai-core/CMakeLists.txt ImgFrame.cpp depthai-opencv.vcxproj -> C:\Users\coven\Documents\depthai-unity\build\depthai-core\Debug\depthai-opencvd.lib Building Custom Rule C:/Users/coven/Documents/depthai-unity/CMakeLists.txt Aruco.cpp C:\Program Files (x86)\aruco\include\aruco\fractallabelers\fractalmarker.h(38,32): warning C4267: 'return'┬á: conversion de 'size_t' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Program Files (x86)\aruco\include\aruco\fractallabelers\fractallabeler.h(41,44): warning C4244: 'return'┬á: conversion de 'double' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,35): warning C4244: 'argument'┬á: conversion de 'float' en '_Tp', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,35): warning C4244: with [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,35): warning C4244: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,35): warning C4244: _Tp=int [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,35): warning C4244: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,27): warning C4244: 'argument'┬á: conversion de 'float' en '_Tp', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,27): warning C4244: with [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,27): warning C4244: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,27): warning C4244: _Tp=int [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(41,27): warning C4244: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,35): warning C4244: 'argument'┬á: conversion de 'float' en '_Tp', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,35): warning C4244: with [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,35): warning C4244: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,35): warning C4244: _Tp=int [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,35): warning C4244: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,27): warning C4244: 'argument'┬á: conversion de 'float' en '_Tp', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,27): warning C4244: with [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,27): warning C4244: [ [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,27): warning C4244: _Tp=int [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\Aruco.cpp(46,27): warning C4244: ] [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] DebugCPP.cpp CameraSettings.cpp SarEnvironment.cpp Plugin.cpp C:\Program Files (x86)\aruco\include\aruco\fractallabelers\fractalmarker.h(38,32): warning C4267: 'return'┬á: conversion de 'size_t' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Program Files (x86)\aruco\include\aruco\fractallabelers\fractallabeler.h(41,44): warning C4244: 'return'┬á: conversion de 'double' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(475,52): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(475,23): error C2062: type 'unknown-type' inattendu [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(475,99): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(475,99): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(475,104): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(477,5): error C2181: instruction else sans if correspondant non conforme [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(618,52): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(618,23): error C2062: type 'unknown-type' inattendu [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(618,99): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(618,99): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(618,104): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(620,5): error C2181: instruction else sans if correspondant non conforme [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(620,53): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(620,23): error C2062: type 'unknown-type' inattendu [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(620,101): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(620,101): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(620,106): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(622,5): error C2181: instruction else sans if correspondant non conforme [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(781,52): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(781,23): error C2062: type 'unknown-type' inattendu [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(781,99): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(781,99): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(781,104): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(783,5): error C2181: instruction else sans if correspondant non conforme [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(783,53): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(783,23): error C2062: type 'unknown-type' inattendu [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(783,101): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(783,101): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(783,106): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(785,5): error C2181: instruction else sans if correspondant non conforme [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(785,53): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(785,23): error C2062: type 'unknown-type' inattendu [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(785,101): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(785,101): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(785,106): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\base\encoding.h(787,5): error C2181: instruction else sans if correspondant non conforme [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\types\detail\logical_buffer.h(62,52): error C2589: '('┬á: jeton non conforme ├á droite de '::' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\types\detail\logical_buffer.h(62,52): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\types\detail\logical_buffer.h(62,52): error C2334: jetons inattendus avant ':'┬á; corps apparent de la fonction ignor├® [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\types\detail\logical_buffer.h(65,1): error C2143: erreur de syntaxe┬á: absence de ')' avant ';' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\types\detail\logical_buffer.h(65,1): error C2059: erreur de syntaxe┬á: ')' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\types\detail\logical_buffer.h(65,1): error C2238: jetons inattendus avant ';' [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:.hunter_Base\16cc954\0e2d5bb\a274529\Install\include\nop\types\detail\logical_buffer.h(65,1): error C1201: impossible de continuer apr├¿s une erreur de syntaxe dans la d├®finition du mod├¿le de classe [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] DepthaiCamera.cpp C:\Users\coven\Documents\depthai-unity\depthai-core\shared\depthai-shared\include\depthai-shared\properties\SyncProperties.hpp(14,32): warning C4244: 'initialisation'┬á: conversion de 'double' en 'uint64_t', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\DepthaiCamera.cpp(63,14): warning C4267: 'initialisation'┬á: conversion de 'size_t' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\DepthaiCamera.cpp(64,14): warning C4267: 'initialisation'┬á: conversion de 'size_t' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] C:\Users\coven\Documents\depthai-unity\DepthaiCamera.cpp(80,27): warning C4267: 'argument'┬á: conversion de 'size_t' en 'int', perte possible de donn├®es [C:\Users\coven\Documents\depthai-unity\build\depthai-unity.vcxproj] G├®n├®ration de code en cours...

Additional context Add any other context about the problem here.

SClerckx commented 2 months ago

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 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