Emscripten uses a virtual file system (so that it can work on the web). So you must either preload or embed the files you want to access,
http://kripken.github.io/emscripten-site/docs/porting/files/packaging_files.html or use NODEFS which in node.js specifically lets you directly access files, http://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#filesystem-api-nodefs On Sat, Aug 13, 2016 at 9:50 PM, Gunjan Shrivastava <[email protected]> wrote: > Hello all, > > I recently started using Emscripten for a project on image analysis. I am > trying to convert sobel edge detection(written in c and c++) to asm.js and > wasm.js. The c file is compiling to asm.js file with no errors. But when I > run asm.js file with node (e.g. node a.out.js) it is stuck in the middle > after I enter the name of the image( in pgm format). I haven’t used any > external library. > > The problem may be that the generated asm.js code is not able to read the > input file or scanf isn’t working correctly in the compiled file. As I am a > newbie, I may have missed out something important. Please direct me to path > or link so that I can resolve this error. > > Please let me know if any other information is needed. I would be really > thankful for any help in this regard. > > > P.S. The c code is running and generating the correct output image. > > Thank you. > > Regards, > Gunjan > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
