Skip to main content
GameDev.net gamedev.net
🔒 Locked

SpiderMonkey

Started by thedigga007 Jun 25, 2004 at 5:36 PM 8 replies 4.4k views
Original Post
thedigga007
thedigga007
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
Raduprv
Raduprv
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.
thedigga007
thedigga007
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?
nonnus29
nonnus29
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.
thedigga007
thedigga007
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...
nonnus29
nonnus29
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
thedigga007
thedigga007
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.