Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using SpiderMonkey in Visual Studio 2005 C++ project (MSVCR80.dll error)

166 views
Skip to first unread message

cork

unread,
Apr 28, 2011, 1:15:40 AM4/28/11
to cork...@gmail.com
I've downloaded the SpiderMonkey source code, then installed
MozillaBuild and built SpiderMonkey. I fire up Visual Studio 2005 and
create a simple project.

The program compiles and links fine, but when I run it I get the
following message:
"Unable To Locate Component. This application has failed to start
because MSVCR80.dll was not found. Re-installing the application may
fix the problem."

I've tried installing Microsoft's redistributable packages for Visual C
++, but to no avail.

Any ideas?

Thanks,
Cork

Colin Fraser

unread,
Apr 28, 2011, 6:30:08 AM4/28/11
to
Hi,

>"cork" <cork...@gmail.com> wrote in message:
> Any ideas?

It may not help with your specific problem, but I used these instructions
(and sln file) to get Spidermonkey 1.8 to build under VS 2005 a while ago:

http://thomas.bindzus.me/2008/02/08/spidermonkey-solution-file-for-microsoft-visual-studio-2005/

However I haven't tried with the latest 1.8.5 build.

Colin

Wes Garland

unread,
Apr 28, 2011, 9:04:12 AM4/28/11
to Colin Fraser, dev-tech-...@lists.mozilla.org
That error means your application could not find the MS Visual C Runtime
DLL. Trying copying it into C:\WINDOWS|SYSTEM or wherever DLLs go these
days (I haven't hacked on Win32 in a decade; details elude me)

Also, you should be using the build instructions on developer.mozilla.org,
and the mozilla-build build environment.

Wes

> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>

--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102

Christoph Niemann

unread,
Apr 28, 2011, 9:11:43 AM4/28/11
to dev-tech-...@lists.mozilla.org
Am 28.04.2011 15:04, schrieb Wes Garland:

It could also mean that you tried to load a release-DLL in to a
debug-application. When you build with visual studio, you have to ensure
that the release build loads release DLLs and vice versa (as an
alternative you an also modify the application's manifest file and add
the missing DLL)

Christoph

> That error means your application could not find the MS Visual C Runtime
> DLL. Trying copying it into C:\WINDOWS|SYSTEM or wherever DLLs go these
> days (I haven't hacked on Win32 in a decade; details elude me)
>
> Also, you should be using the build instructions on developer.mozilla.org,
> and the mozilla-build build environment.
>
> Wes
>
> On 28 April 2011 06:30, Colin Fraser <cfr...@levelfour.com> wrote:
>

>> _______________________________________________
>> dev-tech-js-engine mailing list
>> dev-tech-...@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>>
>
>


--
Dr. Christoph Niemann nie...@otris.de
otris software AG
Koenigswall 21 Tel.: 0231/958069-0
D-44137 Dortmund Fax.: 0231/958069-44

HRB 15040, Amtsgericht Dortmund
Vorstand: Dr. Frank Hofmann, Dr. Christoph Niemann
Aufsichtsratsvorsitzender: Gereon Neuhaus


Mark Giffin

unread,
Apr 28, 2011, 2:44:24 PM4/28/11
to cork, dev-tech-...@lists.mozilla.org
Cork,

A little off the subject here, but I'm hoping to learn something. When
you built SpiderMonkey with Mozillabuild tools, did you build it with
NSPR? If so, how did you accomplish the NSPR build? I'm trying to do
this myself.

Thanks,
Mark

Mark Giffin

unread,
Apr 28, 2011, 10:19:41 PM4/28/11
to Cork Kyle, dev-tech-...@lists.mozilla.org
Hey Cork,

Great stuff, thanks very much for all the details, it's exactly the kind
of info I need. I am currently working to improve the SpiderMonkey docs,
and I'm trying to build a small Hello World app with SpiderMonkey
embedded, that will be the core of a simple tutorial on the Mozilla
Developer's Network SpiderMonkey site. I'm building on Win XP with
Visual C++ 9 (MS Visual C++ 2008 Express), with MozillaBuild, which uses
the cl.exe command line compiler that comes with Visual C++.

I hear from the old hands that it's easier to build NSPR on a unix-like
OS, and many of those OSes even come with NSPR already built and
installed. Windows is the problem child with NSPR builds, and I can
hopefully make the docs more clear. (I too had a laugh about the comment
that NSPR is "easy to install".)

You don't need to download the entire Mozilla tree to get NSPR source,
here are many versions in .gz form, I got the latest (4.8.7):

http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/

The SpiderMonkey build apparently depends on NSPR, but other than that
it should be able to be built separately from the rest of the Mozilla
tree. I was told today by Wes Garland (who works on SpiderMonkey) that
on Windows it's better to build NSPR separately from SpiderMonkey. And
then link it in. As for the exact way to do that, I don't know yet. I
got NSPR to build by itself with no errors, like you did. But for NSPR,
I think there is also a "make install" step after "make". So it's like:

make
make install

Then I ran the configure script and make in the SM src dir with this:

autoconf-2.13
./configure --with-system-nspr --with-nspr-exec-prefix=nsprpub/config
make

make still fails at the very end where it is doing some linking. I'll
let you know if I get it going.

Thanks for showing me how to access the native Windows directories while
in the Mingw32 shell (cd /c/test.debug etc.).

Mark

On 4/28/2011 5:33 PM, Cork Kyle wrote:
> Hi Mark -
>
> This is what I know about NSPR. This is a brain-dump, so please bear
> with my long-windedness.
>
> The page describing how to build SpiderMonkey
> (https://developer.mozilla.org/en/Building_only_SpiderMonkey) says
> "Before you begin, make sure you have right build tools for your
> computer: Linux
> <https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Linux_Prerequisites>,
> Windows
> <https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Windows_Prerequisites>,
> Mac
> <https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites>,
> others
> <https://developer.mozilla.org/En/Developer_Guide/Build_Instructions>.
> In addition, you will need NSPR, which is easy to install
> <https://developer.mozilla.org/en/NSPR>."
>
> I installed MozillaBuild. Then I used this page, which describes NSPR.
> https://developer.mozilla.org/en/NSPR
>
> A link on that page pointed me to this page, which describes how to
> build NSPR.
> https://developer.mozilla.org/en/NSPR_build_instructions
>
> Okay, that was the preface.
>
> First, I downloaded the full source code of Firefox from the Mercurial
> repository to a local directory, c:\mozilla-central.
>
> I had previously downloaded just the SpiderMonkey source code, but had
> an issue building it, as there seemed to be a dependency on some other
> folder in the Firefox source code.
>
> The NSPR source code and build stuff exists
> C:\mozilla-central\nsprpub. Okay, I remember, that's why I probably
> downloaded the full Firefox source code was so I could get NSPR.
>
> I love how the SpiderMonkey build page says "In addition, you will
> need NSPR, which is easy to install
> <https://developer.mozilla.org/en/NSPR>." because it is anything but
> easy, for a Windows/C++ programmer that isn't familiar with Linux and
> their tools.
>
> Now that I know where the NSPR source code tree is, I refer to
> https://developer.mozilla.org/en/NSPR_build_instructions.
>
> It says the prerequisites are to have MozillaBuild installed. I have
> that installed in c:\mozilla-build.
>
> I'm using Visual Studio 2005, and I you launch a different BAT file in
> the MozillaBuild directory, based on which Visual Studio version you
> are using. I launch start-msvc8.bat.
>
> Next I refer to this page:
> https://developer.mozilla.org/en/NSPR_build_instructions
>
> At the MozillaBuild prompt I type the following lines, which I *think*
> builds NSPR:
> mkdir /c/test.debug
> cd /c/test.debug
> /c/mozilla-central/nsprpub/configure
> make
> cd pr/tests
> make
>
> Now, I assume that NSPR is built and resides in my c:/test.debug
> directory.
>
> Now, to build SpiderMonkey, using NSPR, I refer to this page.
> https://developer.mozilla.org/En/SpiderMonkey/Build_Documentation
>
> On this page I'm reading the following sections: "Troubleshooting
> NSPR" and "NSPR on Windows".
>
> This is where I'm at right now...
> I'm thoroughly re-reading these two sections and experimenting. I
> think I have NSPR built, and now I need to tell it where to find NSPR
> when I'm building SpiderMonkey on Windows.
>
> Stay in touch and let me know if you have success in building
> SpiderMonkey. I'm using Windows Vista and Visual Studio 2005.
>
> Cork


>
>
> On Thu, Apr 28, 2011 at 11:44 AM, Mark Giffin <m1...@earthlink.net
> <mailto:m1...@earthlink.net>> wrote:
>
> Cork,
>
> A little off the subject here, but I'm hoping to learn something.
> When you built SpiderMonkey with Mozillabuild tools, did you build
> it with NSPR? If so, how did you accomplish the NSPR build? I'm
> trying to do this myself.
>
> Thanks,
> Mark
>
>
> On 4/27/2011 10:15 PM, cork wrote:
>

> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org

> <mailto:dev-tech-...@lists.mozilla.org>
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
>
>

0 new messages