0

I try to execute v8 runtime environment from within c++ application to achive js support for my application. I successfully compile v8pp and now try to use the lib in my own console application. Currently I get a lot of unresolved symbol messages and do not get it what is the difference from working unit tests project within v8pp solution. Can someone point me to the right direction of what I am doing wrong here?

enter image description here

Build started...
1>------ Build started: Project: v8pp, Configuration: Debug Win32 ------
1>class.cpp
1>context.cpp
1>convert.cpp
1>json.cpp
1>throw_ex.cpp
1>version.cpp
1>Generating Code...
1>v8pp.vcxproj -> C:\git\v\v8pp\bin\Debug\v8pp.lib
2>------ Build started: Project: ConsoleApplication1, Configuration: Debug Win32 ------
2>ConsoleApplication1.obj : error LNK2019: unresolved external symbol "void __cdecl v8::api_internal::ToLocalEmpty(void)" (?ToLocalEmpty@api_internal@v8@@YAXXZ) referenced in function "public: class v8::Local<class v8::Function> __thiscall v8::MaybeLocal<class v8::Function>::ToLocalChecked(void)" (?ToLocalChecked@?$MaybeLocal@VFunction@v8@@@v8@@QAE?AV?$Local@VFunction@v8@@@2@XZ)
...

From what I can see I use same methods already used in unit tests.

enter image description here

Stephan Ahlf
  • 3,310
  • 5
  • 39
  • 68
  • 1
    what does your link configuration property page look like? – tromgy Sep 15 '21 at 18:26
  • @tromgy just added a screenshot. – Stephan Ahlf Sep 15 '21 at 19:14
  • unfortunately not all **Additional dependencies** are visible. Maybe just post your full linker command line? Also select the actual configuration you're trying to build from the **Configuration** combo box. – tromgy Sep 15 '21 at 19:18
  • $(SolutionDir);%(AdditionalIncludeDirectories);c:\git\v8\include\;c:\git\v8\ (additional deps), trying to build win32. Linker command line? Sorry I am c++ noob, I just press play in VS I have a build output. Update this in a second – Stephan Ahlf Sep 15 '21 at 19:24
  • What I just realize is errors are v8 related not v8pp – Stephan Ahlf Sep 15 '21 at 19:26
  • 1
    Yes, that's what I suspected. You need to make sure that V8 .lib files (whatever they might be) are listed in the **Additional dependencies** – tromgy Sep 15 '21 at 19:37
  • Sounds reasonable. Not quite sure why test suite project works with same settings. even if do not find a v8.lib on my drive. I have v8.dll via nuget. ... – Stephan Ahlf Sep 15 '21 at 19:46
  • Then I guess I need to compile c:\git\v8\ to v8 libs – Stephan Ahlf Sep 15 '21 at 19:48

0 Answers0