Re: SpiderMonkey38 as static lib on Windows

Mihai Dobrescu <[email protected]> Mon, 22 Aug 2016 10:19:17 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
On Monday, August 22, 2016 at 7:09:53 PM UTC+3, [email protected] wrote:
> Hi Guys,
> 
> I'd like to use SpiderMonkey 38 on Windows as a static library.
> 
> I have built x86 for Windows using the package published in this thread:
> https://groups.google.com/forum/#!topic/mozilla.dev.tech.js-engine/1GC-7lkX-qk
> Package: http://people.mozilla.org/~sfink/data/mozjs-38.3.0sfink2.tar.bz2 
> 
> I can compile and link my own executables using mozjs-38.lib as:
> 
> cl.exe /EHs /I"d:\spidermonkey38\js\src\build_OPT.OBJ\dist\include" /c helloworld.cpp
> link.exe helloworld.obj "d:\spidermonkey38\js\src\build_OPT.OBJ\dist\lib\mozjs-38.lib"
> 
> However, the below page suggests to use the "--disable-shared-js" flag for the configure script to build SpiderMonkey as a static lib:
> https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation#Building_SpiderMonkey_as_a_static_library
> 
> If I add this flag, then no mozjs-38.lib gets generated during mozmake.
> Am I doing something wrong? Should I be using the "js_static.lib" to link my executable somehow?
> 
> I'd appreciate any guidance!
> 
> Thanks,
> tamas

Did you look in "build_OPT.OBJ\dist\sdk\lib"?