Subj : spidermonkey and win32 questions To : netscape.public.mozilla.jseng From : lord.darius@caramail.com (Darius) Date : Thu Dec 11 2003 01:40 am Hello, I intend to embed the Javascript SpiderMonkey engine in a win32 freeware application, so I've downloaded the sources, compiled them, run the tests. Now there are some questions i'd like to ask : 1) I need to link spidermonkey as a static library, but when i do so, i get some linking warnings caused by the use of declspec(dllimport) when building jsshell, declaration obviously not required in that case. So my solution was to patch jstypes.h to check for a _STATIC preprocessor variable disabling declspec(dllimport), variable that I define for a static library build config. Is it ok to do so ? I mean, is static linking officially supported by spidermonkey on win32 ? And what about multithreading issues ? Can i safely use the engine with the win32 synchronisation api or do i have to use NSPR (assuming i'll use 1 context per thread)? And is the fact of `modifying' it for freeware use a licencing issue ? 2) For testing purpose, I compiled js and jsshell using the default release configuration (on win2k pro sp4, msvc++ 6, js 1.5 rc5a, and the /OPT:NOICF flag) and i run the tests suite provided separately, omitting all liveconnect tests. My results are : 1069 test(s) selected, 1064 test(s) completed, 15 failures reported (1.4% failed), and one of these failing tests made jsshell crash. Is it a real problem ? (If someone is interested, I can mail the full result file) Regards, D. .