Comments (3)
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.
Thanks for your help!
After adding the flags, It is working now.
from h5pp.
Great! I'll add the steps to the readme.
from h5pp.
Related Issues (16)
- Support for container or `Eigen::Map` HOT 5
- write fails for custom structs of length >3 HOT 3
- h5pp compatibility issues with hdf5 1.13 HOT 3
- Some issues with H5PP on Mac HOT 8
- Cmake error while building h5pp HOT 1
- How to write dateaset with struct and std::string HOT 2
- `std::is_pod_v` deprecated in C++20 HOT 1
- Overwrite cmake flag CMAKE_CXX_STANDARD HOT 1
- Cmake 3.16: Configuration error in find_package(h5pp REQUIRED) HOT 2
- Compilation Failure on M1 MacOS due to Missing -lrt and -lsz HOT 2
- Add example of how to read or write a slice of a dataset HOT 4
- Add readDataset() overload that takes hid::h5t. HOT 4
- h5pp without CMake (HDF5 windows binary installer) HOT 1
- How to traverse a hdf5 file with h5pp? HOT 1
- Can this library be use in .net enviroment? HOT 3
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 h5pp.