Advertisement

SpiderMonkey

Started by June 25, 2004 05:36 PM
8 comments, last by Raduprv 20 years, 4 months ago
Hi I am currently trying to use spidermonkey in my game engine however I am having problems using the generated .dll file. I compiled the SpiderMonkey engine using VS .Net 2003 and it build fine and output a .dll file along with the lib and exe. Whenever I try to build some example code that uses the engine, I get:

fatal error C1083: Cannot open include file: 'jsapi.h': No such file or directory
I placed the js32.dll in my System32 directory but it still doesnt work. Also, when I try to add the dll as a resource, I get an error from VS .Net saying it cannot add the resource. So then I thought maybe it was because the dll was not registered so I ran Regsvr32 js32.dll, but that gives me an error saying it cannot find js32.dll DLLInstall entry point. How do I get it to work? I tried searching the forums but the searching mechanism is currently down. Thanks -Digga
Why not just statically link with it?
Also, if you want a C like scripting language, you might want to try Small. Very easy to embed, and really nice. It even hasa JIT version, for Windows.
Advertisement
I am sorry I dont quite understand how I would do it statically? Are you reffering to not using a dll? or loading the dll from my program on runtime?
Statically as in including the SpiderMonkey files in your project (not using a DLL).
The problem is the compiler can't find the 'jsapi.h' file so you have two options;

1) place the 'jsapi.h' in the vs.net 'include' folder
2) there might be a dialogue ('project options' maybe) that lets you specify external libraries/files.
There are no header files generated from the compilation....building using the dev studio project that mozilla provides...and their instructions state that only the dll is necessary...
Advertisement
Doesn't jsapi.h come with the zip file?
There should be an include file, a bin file, and a lib file. You need all three. Place the jsapi.h in your compilers include, the .libs should go in the Lib file and the .dll can go in either the system folder or place it in the same file as the executable.

I can't give anymore specific instructions than that because I don't own visual studio dot net :P
Thanks for being patient and helpful its much appreciated...finally got it to build after your suggestions...I didnt realize the header file came with it (stupid i know).

thanks again,

-digga
Np, glad we could help.

This topic is closed to new replies.

Advertisement