Giter Site home page Giter Site logo

Comments (3)

DavidAce avatar DavidAce commented on August 15, 2024

Hi! The error seems to come from a couple of missing compile flags. If you are not using CMake, you should add the following to the MSVC compiler:

  • flag /permissive- for and/or logical operators
  • flag /EHsc for try/catch without warnings (I believe)
  • definition /D NOMINMAX for std::min and std::max to work as expected

These flags are applied and propagated as necessary when using CMake here. The full set of flags added by CMake and MSVC can be seen in the github actions build output:

cl /c /ID:\a\h5pp\h5pp\include /IC:\Users\runneradmin\.conan\data\eigen\3.4.0\_\_\package\5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9\include\eigen3 /IC:\Users\runneradmin\.conan\data\spdlog\1.9.2\_\_\package\5b1df17eadd1f81a71020461515f4af1686e577d\include /IC:\Users\runneradmin\.conan\data\fmt\8.0.1\_\_\package\157b7622dba188aff47602e51eaebfda53684339\include /IC:\Users\runneradmin\.conan\data\hdf5\1.12.0\_\_\package\83d29b61affb54f49fd1478ec437e6a0d8cfba27\include /IC:\Users\runneradmin\.conan\data\hdf5\1.12.0\_\_\package\83d29b61affb54f49fd1478ec437e6a0d8cfba27\include\hdf5 /IC:\Users\runneradmin\.conan\data\zlib\1.2.11\_\_\package\d057732059ea44a47760900cb5e4855d2bea8714\include /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D SPDLOG_COMPILED_LIB /D SPDLOG_FMT_EXTERNAL /D NOMINMAX /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++17 /Fo"h5pp-example-01c-struct-simple.dir\Debug\\" /Fd"h5pp-example-01c-struct-simple.dir\Debug\vc142.pdb" /external:W1 /Gd /TP /errorReport:queue "D:\a\h5pp\h5pp\examples\example-01c-struct-simple.cpp"

I should probably mention all this in the README. Please tell me if the flags above fixes the issue.

from h5pp.

Fokatu avatar Fokatu commented on August 15, 2024

Thanks for your help!
After adding the flags, It is working now.

from h5pp.

DavidAce avatar DavidAce commented on August 15, 2024

Great! I'll add the steps to the readme.

from h5pp.

Related Issues (16)

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.