Skip to content

Instantly share code, notes, and snippets.

@verma
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verma/7bd21274edcb1016d0a8 to your computer and use it in GitHub Desktop.
Save verma/7bd21274edcb1016d0a8 to your computer and use it in GitHub Desktop.
/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);
#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