Thank you Jochen, Ben, Louis for your help.  It's all up and running now. 
 Just for posterity, and to help the person who comes after me, here are a 
few quick things that slowed me down along the way:  (I am using Visual 
Studio 2013 Update 4 on Windows 8.1 Pro 64 bit.  compiled in 32 bit mode 
for now for V8 in VS2013) : 

1. If you get lots of VS2013 linker error   "LNK2005: _isdigit already 
defined in MSVCRTD.lib(MSVCR120D.dll)" etc etc  errors when you try to 
compile your hello world program, make sure that under Project :: 
Properties :: Configuration Properties :: C/C++ :: Code Generation :: 
Runtime Library you have the same version of the library for your hello 
world program that you used to compile your V8 library (I used /MTd - 
Multi-threaded Debug on both).

2. If you get "error LNK2019: unresolved external symbol "public: 
__thiscall v8::HandleScope::HandleScope(class v8::Isolate *)" 
(??0HandleScope@v8@@QAE@PAVIsolate@1@@Z) referenced in function _wmain" 
etc. errors...  Under Project :: Properties :: Configuration Properties :: 
Linker :: Input :: Additional Dependencies  make sure the following files 
(with whatever path you used for your V8) are included: 
C:\Dev\v8\build\Debug\lib\v8_base.lib
C:\Dev\v8\build\Debug\lib\v8_libbase.lib
C:\Dev\v8\build\Debug\lib\v8_libplatform.lib
C:\Dev\v8\build\Debug\lib\v8_nosnapshot.lib
C:\Dev\v8\build\Debug\lib\icuuc.lib
C:\Dev\v8\build\Debug\lib\icui18n.lib
ws2_32.lib
winmm.lib

3. and of course make sure that under Project :: Properties :: 
Configuration Properties :: C/C++ :: General :: Additional Include 
Directories you add the path to your v8\include directory and your 
v8\include\libplatform directories.

4. When you are following the directions for downloading the V8 source code 
and running GYP, make sure you FIRST install all the tools (git, svn (I 
used TortoiseSVN), MSys + MinGW (remember to create the fstab file in 
C:\MinGW\msys\1.0\etc\ file), Python 2.7.x) and verify that they are 
working and in your cmd shell path.

5. Make sure when you are in your Windows CMD shell that your path has no 
spaces, no parenthesis, etc., AND as mentioned in #4, that it includes all 
the paths to the appropriate tools.  Here is the full path that ended up 
working for me.  
PATH=C:\Dev\Python27\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Dev\Git\cmd;C:\Dev\depot_tools;C:\MinGW\bin;c:\MinGW\msys\1.0\bin;C:\Dev\TortoiseSVN\bin

6. Here is the exact hello.cpp file I used (thanks Jochen) : (this worked 
11/18/2014, but it seems that the required startup initialization code for 
V8 changes occasionally, so check to make sure this is up to date):

// Learning_V8_001.cpp : Defines the entry point for the console 
application.
//


#include "stdafx.h"
#include "v8.h"
#include "libplatform.h"


using namespace v8;


int _tmain(int argc, _TCHAR* argv[])
{
 // Initialize V8.
 V8::InitializeICU();
 Platform* platform = platform::CreateDefaultPlatform();
 V8::InitializePlatform(platform);
 V8::Initialize();


 // Create a new Isolate and make it the current one.
 Isolate* isolate = Isolate::New();
 {
 Isolate::Scope isolate_scope(isolate);


 // Create a stack-allocated handle scope.
 HandleScope handle_scope(isolate);


 // Create a new context.
 Local<Context> context = Context::New(isolate);


 // Enter the context for compiling and running the hello world script.
 Context::Scope context_scope(context);


 // Create a string containing the JavaScript source code.
 Local<String> source = String::NewFromUtf8(isolate, 
"a={'first':4,'second':66}");


 // Compile the source code.
 Local<Script> script = Script::Compile(source);


 // Run the script to get the result.
 Local<Value> result = script->Run();


 // Convert the result to an UTF8 string and print it.
 String::Utf8Value utf8(result);
 printf("%s\n", *utf8);
 char ch;   scanf("%c", &ch, 1);
 }
  
 // Dispose the isolate and tear down V8.
 isolate->Dispose();
 V8::Dispose();
 V8::ShutdownPlatform();
 delete platform;
 return 0;
}


can't think of anything else off the top of my head.  Hope this helps. 
 -Mark


On Monday, November 17, 2014 1:14:32 AM UTC-8, Jochen Eisinger wrote:
>
> I've updated the example to correctly setup and tear down V8 with the 
> latest version (3.30)
>
> best
> -jochen
>
> On Mon Nov 17 2014 at 9:28:09 AM Ben Noordhuis <[email protected] 
> <javascript:>> wrote:
>
>> On Mon, Nov 17, 2014 at 8:53 AM, Mark Topinka <[email protected] 
>> <javascript:>> wrote:
>> > Thanks Louis.  Those instructions worked... Sorry for neglecting to say 
>> this
>> > in my initial post, but I need to compile in Visual Studio 2013 for 
>> Windows
>> > 8.1...  how would one go about producing a VS2013 "All.sln" file and 
>> all the
>> > associate .vcproj files?   I believe you implied that the instructions 
>> on
>> > the old "BuildingWithGYP" wiki page
>> > (https://code.google.com/p/v8-wiki/wiki/BuildingWithGYP) are apparently
>> > out-of-date?  Thank you.  -Mark
>>
>> The instructions on the wiki look accurate to me.  If you have or have
>> had multiple VS installations or have the Windows SDK installed, it's
>> possible that GYP is picking up the wrong one.  Specify `-G
>> msvs_version=2013` on the command line or set `GYP_MSVS_VERSION=2013`
>> in the environment.  Change '2013' to '2013e' for VS Express.
>>
>> --
>> --
>> v8-users mailing list
>> [email protected] <javascript:>
>> http://groups.google.com/group/v8-users
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "v8-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to