Greetings everyone! I'm new to v8 and I'm having a little bit of trouble with unresolved external symbols when building the *HelloWorld example* (found here: https://developers.google.com/v8/get_started#intro) in *Visual studio 2012*
I'm going to go into detail here so that this discussion may help others who attempt to solve this problem. I've followed the build instructions (found here: https://code.google.com/p/v8/wiki/BuildingWithGYP#Building) to the letter and everything worked just fine as far as I can tell. The last part involved opening* v8\build\all.sln* with *Visual Studio 2012*and allowing the automatic conversion process to update everything from *VS2010* to *VS2012*. I've made it rebuild in *Release mode* and all projects have been build successfully. The *Release\lib* folder contained the following libs: -icui18n.lib -icuuc.lib -v8_base.lib -v8_nosnapshot.lib -v8_snapshot.lib I went and tried out *v8\build\Release\shell.exe* (which, to my knowledge, depends on v8) and it worked. Next step, I started a New Project, console application (empty) and added the *v8\include* and *v8\build\Release\lib* folders in *a new "v8" folder*in my new project simply as *include* and *lib* ->pasted the HelloWorld code in *main.cpp* ->went to *Project*->*Properties*->*VC++ Directories* and added a path for *Include Directories* to point towards the *v8\include* folder and *Library Directories* to point towards *v8\lib* folder. Intelisense stopped pointing out that I'm missing .h files so i figured everything was set up properly. I previously picked *Release mode* again and did a *clean rebuild*. The following was printed on the Output: 1>------ Rebuild All started: Project: HelloWorld, Configuration: Release >> Win32 ------ > > 1> main.cpp > > 1>main.obj : error LNK2001: unresolved external symbol "public: void >> __thiscall v8::Context::Exit(void)" (?Exit@Context@v8@@QAEXXZ) > > 1>main.obj : error LNK2001: unresolved external symbol "public: void >> __thiscall v8::Context::Enter(void)" (?Enter@Context@v8@@QAEXXZ) > > 1>main.obj : error LNK2001: unresolved external symbol "public: static >> class v8::Local<class v8::Context> __cdecl v8::Context::New(class >> v8::Isolate *,class v8::ExtensionConfiguration *,class v8::Handle<class >> v8::ObjectTemplate>,class v8::Handle<class v8::Value>)" >> (?New@Context@v8@@SA?AV?$Local@VContext@v8@@@2@PAVIsolate@2@PAVExtensionConfiguration@2@V?$Handle@VObjectTemplate@v8@@@2@V?$Handle@VValue@v8@@@2@@Z) > > 1>main.obj : error LNK2001: unresolved external symbol "public: class >> v8::Local<class v8::Value> __thiscall v8::Script::Run(void)" >> (?Run@Script@v8@@QAE?AV?$Local@VValue@v8@@@2@XZ) > > 1>main.obj : error LNK2001: unresolved external symbol "public: static >> class v8::Local<class v8::Script> __cdecl v8::Script::Compile(class >> v8::Handle<class v8::String>,class v8::ScriptOrigin *)" >> (?Compile@Script@v8@@SA?AV?$Local@VScript@v8@@@2@V?$Handle@VString@v8@@@2@PAVScriptOrigin@2@@Z) > > 1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall >> v8::String::Utf8Value::~Utf8Value(void)" (??1Utf8Value@String@v8@@QAE@XZ) > > 1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall >> v8::String::Utf8Value::Utf8Value(class v8::Handle<class v8::Value>)" >> (??0Utf8Value@String@v8@@QAE@V?$Handle@VValue@v8@@@2@@Z) > > 1>main.obj : error LNK2001: unresolved external symbol "public: static >> class v8::Local<class v8::String> __cdecl v8::String::NewFromUtf8(class >> v8::Isolate *,char const *,enum v8::String::NewStringType,int)" >> (?NewFromUtf8@String@v8@@SA?AV?$Local@VString@v8@@@2@PAVIsolate@2@PBDW4NewStringType@12@H@Z) > > 1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall >> v8::HandleScope::~HandleScope(void)" (??1HandleScope@v8@@QAE@XZ) > > 1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall >> v8::HandleScope::HandleScope(class v8::Isolate *)" >> (??0HandleScope@v8@@QAE@PAVIsolate@1@@Z) > > 1>main.obj : error LNK2001: unresolved external symbol "public: static >> class v8::Isolate * __cdecl v8::Isolate::GetCurrent(void)" >> (?GetCurrent@Isolate@v8@@SAPAV12@XZ) > > 1>C:\Game_Development\V8Native\PozdravSvijete\HelloWorld\Release\HelloWorld.exe > >> : fatal error LNK1120: 11 unresolved externals > > ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== > > Now this is my n'th attempt at this, I tried a whole bunch of other stuff in previous empty console projects that I wasn't sure about and it didn't help at all. I started this one from scratch and stopped at this point hoping that someone could shed some light on this issue. :) -- -- 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.
