Last active
August 29, 2015 14:02
-
-
Save verma/7bd21274edcb1016d0a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/verma/work/laz-perf/examples/readlaz.cpp:19:4: error: use of undeclared identifier 'FS' | |
FS.mkdir('/files'); | |
^ | |
/Users/verma/work/laz-perf/examples/readlaz.cpp:19:13: warning: multi-character character constant [-Wmultichar] | |
FS.mkdir('/files'); | |
^ | |
/Users/verma/work/laz-perf/examples/readlaz.cpp:19:13: warning: character constant too long for its type | |
/Users/verma/work/laz-perf/examples/readlaz.cpp:20:4: error: use of undeclared identifier 'FS' | |
FS.mount(NODEFS, { root: '.' }, '/files'); | |
^ | |
/Users/verma/work/laz-perf/examples/readlaz.cpp:20:13: error: use of undeclared identifier 'NODEFS' | |
FS.mount(NODEFS, { root: '.' }, '/files'); | |
^ | |
/Users/verma/work/laz-perf/examples/readlaz.cpp:21:2: error: expected expression | |
); | |
^ | |
/Users/verma/work/laz-perf/examples/readlaz.cpp:26:16: error: redefinition of 'file' | |
std::ifstream file(filename, std::ios::binary); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef EMSCRIPTEN_BUILD | |
EM_ASM( | |
FS.mkdir('/files'); | |
FS.mount(NODEFS, { root: '.' }, '/files'); | |
); | |
filename = std::string("/files/" + filename); | |
std::ifstream file(std::string(filename, std::ios::binary)); | |
std::ifstream file(filename, std::ios::binary); | |
if (!file.good()) { | |
std::cerr << "Could not open file for reading: " << filename << std::endl; | |
std::cerr << strerror(errno) << std::endl; | |
return -1; | |
} | |
#else | |
std::ifstream file(filename, std::ios::binary); | |
if (!file.good()) { | |
std::cerr << "Could not open file for reading: " << filename << std::endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment