Errors compiling to emscripten

122 views
Skip to first unread message

Bruno Santos

unread,
Mar 17, 2016, 3:53:22 PM3/17/16
to Haxe

Hi,

Was giving a try to compile a lime project to emscripten and I'm getting 3 errors.

Check the pastebin for the error log: 

http://pastebin.com/61CpPSvt

The errors I get are the following:

-----------------------------------------------

D:/HaxeToolkit/haxe/lib/hxcpp/3,2,205/src/hx/gc/Immix.cpp:315:9: error: unknown type name 'HxAtomicLock'

typedef HxAtomicLock ThreadPoolLock;

        ^

-----------------------------------------------

In file included from D:/HaxeToolkit/haxe/lib/hxcpp/3,2,205/src/hx/gc/Immix.cpp:4:

D:/HaxeToolkit/haxe/lib/hxcpp/3,2,205/include\hx/Thread.h:184:25: error: member reference base type 'int' is not a structure or union

   ~TAutoLock() { mMutex.Unlock(); }

                  ~~~~~~^~~~~~~

------------------------------------------------

D:/HaxeToolkit/haxe/lib/hxcpp/3,2,205/include\hx/Thread.h:183:59: error: member reference base type 'int' is not a structure or union

   TAutoLock(LOCKABLE &inMutex) : mMutex(inMutex) { mMutex.Lock(); }

                                                    ~~~~~~^~~~~

My versions are:

Haxe: 3.2.1

HxCPP: 3.2.205

Lime: 2.9.0

Openfl: 3.6.0

Any pointers on what could be wrong?

Thanks,

Bruno

Hugh

unread,
Mar 21, 2016, 12:19:16 AM3/21/16
to Haxe
Looks like I need to conditionally exclude those parts from emscripten build.
emscripten does not have threads so this code does not need, and can not use, the mutex/lock code.

Hugh

OvermindDL1

unread,
May 16, 2016, 4:18:02 PM5/16/16
to Haxe
Still same issue on latest release build.

Hugh

unread,
May 17, 2016, 12:34:13 AM5/17/16
to Haxe
Have you tried the git version?  I removed one "#ifdef emscripten" an that seems to fix the problem.

Hugh
Reply all
Reply to author
Forward
0 new messages