Hey Mark!
On Thu, Jul 3, 2014 at 12:09 AM, Mark Callow <[email protected]> wrote: > Still trying to use gsathya's SDL2 port. > > > On 02/07/2014 18:02, Mark Callow wrote: > > I will try copying to my emscripten 1.16 folder instead of explicitly > including it in the command. > > Had the same problem. Emscripten/Clang complained SDL wasn't a bit code > library. > > I have now added gsathya's fork of Emscripten to the remotes in my local > clone and checked out the "sdl" branch. I then set EMSCRIPTEN_ROOT to that > clone/branch and attempted to build. During the final link (i.e BC to JS > phase) I get > > 1> \Users\callow_mark\appdata\local\temp\tmpmhikec.c(28,10): fatal error : > 'SDL/SDL_rect.h' file not found > 1> #include "SDL/SDL_rect.h" > 1> ^ > 1> 1 error generated. > > All the files passed to my emcc command are either .o or .bc. I have no idea > what tmpmhikec.c is. By the time the error appears, the temp file has been > deleted so I can't look at it. Since emcc is being called for linking the > command contains no -I options to specify include directories. For what is > worth, SDL_rect.h exists in both the SDL and SDL2 directories in > $EMSCRIPTEN_ROOT/system/include. > > How do I use this version of Emscripten? I haven't seen this error before. Here's a HOWTO on using sdl2 without changing anything in emscripten - * $ git clone https://github.com/gsathya/SDL-emscripten.git * $ cd SDL-emscripten * $ emconfigure ./configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --enable-cpuinfo=false CFLAGS="-O2" * $ emmake make Now the SDL2 port would've been built in /path/to/SDL-emscripten/build/.libs You can include the headers by adding "-I/path/to/SDL-emscripten/include" and then including SDL itself by just adding the path to the built lib. So if previously your command was something like - $ emcc foo.c -o a.html it changes to $ emcc foo.c -I/path/to/SDL-emscripten/include /path/to/SDL-emscripten/build/.libs/libSDL2.a -o a.html I'm not entirely sure how all of this translates to VS, though. If anyone with VS experience can help, that'd be awesome! Thanks, --Sathya -- 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.
