Hi Sathya
On 04/07/2014 03:14, Sathyanarayanan Gunasekaran wrote:
> 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!
I am trying to use your GitHub emscripten fork that contains the SDL2
libraries. I was hoping to avoid having to build SDL2 myself. I just
tried that and the emconfigure step is failing, as noted in another thread.
Is it necessary to add -lSDL2 to my link command? I was expecting that
since I was using your fork, emcc would automatically search the SDL2
libraries.
The error I am seeing is because it looks like some source is being
compiled during the link step when no -I is defined (and in VS cannot be
defined) so the SDL includes are not found. I have been unable to figure
out what file is being compiled from source.
Regards
-Mark
--
注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合
が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情
報の使用を固く禁じております。エラー、手違いでこのメールを受け取られまし
たら削除を行い配信者にご連絡をお願いいたし ます.
NOTE: This electronic mail message may contain confidential and
privileged information from HI Corporation. If you are not the intended
recipient, any disclosure, photocopying, distribution or use of the
contents of the received information is prohibited. If you have received
this e-mail in error, please notify the sender immediately and
permanently delete this message and all related copies.
--
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.