Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu22.4_error: ‘istream’ is not a member of ‘std’ #107

Open
xieyouchen opened this issue Jun 9, 2024 · 2 comments
Open

ubuntu22.4_error: ‘istream’ is not a member of ‘std’ #107

xieyouchen opened this issue Jun 9, 2024 · 2 comments

Comments

@xieyouchen
Copy link

Hi! I found an error when I build my project on Ubuntu22.4 with gcc/g++ 1.1, cmake3.28.1
And the error maybe from the partio libarary. If someone can give me some advice, I would appreciate it.

[1/3] Building CXX object external/par...lib/CMakeFiles/partio.dir/io/PRT.cpp.o
FAILED: external/partio/src/lib/CMakeFiles/partio.dir/io/PRT.cpp.o

/usr/bin/c++ -Dpartio_EXPORTS -I/tmp/tmp.N1TGuCtCNm/include -I/tmp/tmp.N1TGuCtCNm/external/glad/include -I/tmp/tmp.N1TGuCtCNm/external/partio/src/lib -I/tmp/tmp.N1TGuCtCNm/external/spdlog/include -g -std=c++11 -fPIC -fdiagnostics-color=always -w -Wextra -Wno-unused-parameter -MD -MT external/partio/src/lib/CMakeFiles/partio.dir/io/PRT.cpp.o -MF external/partio/src/lib/CMakeFiles/partio.dir/io/PRT.cpp.o.d -o external/partio/src/lib/CMakeFiles/partio.dir/io/PRT.cpp.o -c /tmp/tmp.N1TGuCtCNm/external/partio/src/lib/io/PRT.cpp

/tmp/tmp.N1TGuCtCNm/external/partio/src/lib/io/PRT.cpp:95:30: error: ‘istream’ is not a member of ‘std’
95 | static bool read_buffer(std::istream& is, z_stream& z, char* in_buf, void* p, size_t size, std::ostream* errorStream) {
| ^~~~~~~

/tmp/tmp.N1TGuCtCNm/external/partio/src/lib/io/PRT.cpp:92:1: note: ‘std::istream’ is defined in header ‘’; did you forget to ‘#include ’?
91 | #include "half2float.h"
+++ |+#include
92 | };

@xieyouchen xieyouchen changed the title ubuntu22.4_error ubuntu22.4_error: ‘istream’ is not a member of ‘std’ Jun 9, 2024
@davvid
Copy link
Member

davvid commented Jun 12, 2024

Hmm.. I'm on debian/testing (gcc 13.2) and it builds okay for me here. I'm pretty sure we have source compatibility with compilers going back to gcc 4.6 but maybe I don't have all of the optional dependencies enabled.

Here's a wild guess.. try adding #include <iostream> to src/lib/io/PRT.cpp before the //#define USE_ILMHALF comment. If that compiles correctly in your environment please share a PR and we can merge that in.

@xieyouchen
Copy link
Author

xieyouchen commented Jun 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants