0
votes

This question shows that linker shows the error indicating the function with a referenced symbol:

v8_libbase.lib(platform-win32.obj) : error LNK2019: unresolved external symbol __imp_timeGetTime
referenced in function
"public: void __cdecl v8::base::Win32Time::SetToCurrentTime(void)" (?SetToCurrentTime@Win32Time@base@v8@@QEAAXXZ)

v8_libbase.lib(time.obj) : error LNK2001: unresolved external symbol __imp_timeGetTime

But the error in Visual Studio 2015 that I'm using the doesn't contain referenced in function part. Is there a way to configure a studio to show the referenced in function part?

Here is the list of errors I get:

1>------ Build started: Project: v8, Configuration: Release x64 ------
1>  v8.cpp
1>v8_libbase.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp_timeGetTime
1>v8_libbase.lib(time.obj) : error LNK2001: unresolved external symbol __imp_timeGetTime
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_StackWalk64
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymSetOptions
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymFunctionTableAccess64
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymGetModuleBase64
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymGetLineFromAddr64
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymInitialize
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymGetSearchPathW
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymSetSearchPathW
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_SymFromAddr
1>v8_libbase.lib(stack_trace_win.obj) : error LNK2001: unresolved external symbol __imp_PathRemoveFileSpecW
1>C:\Users\mkore\Documents\Visual Studio 2015\Projects\v8\x64\Release\v8.exe : fatal error LNK1120: 11 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
1
Can you post the full error message you are getting? It might be referring to a virtual function, which doesn't have to be referenced to be required. - Angew is no longer proud of SO
You don't need the missing part to either diagnose or resolve this issue. Just link with the required library. - yzt
@yzt, I don't know what is the required library. That's the problem - Max Koretskyi
Google for the function names. My point is that all the required info is already in the message. - yzt
@yzt, yeah, I get your point, thanks, __imp_StackWalk64 is the name of the function. Just wondering why it's not showing the entire part - Max Koretskyi

1 Answers

2
votes

You do not need the missing part to diagnose and fix these errors. These error's happen when you call a function (or reference a variable, but that's not as common) in your code that the linker can't find a definition for among all the object and library files it is linking together. For example, if your function A calls an external function B, and B is missing, then the linker issues this error saying "unresolved external symbol B".

In these cases, A (which is what you say is missing from your error report) is usually completely irrelevant (unless you want to figure out why the hell you are calling B in the first place.)

First of all, in majority of cases, these errors mean that you are missing a library (or source file) from your build.

If you have no idea at all what the missing libraries are, start googling the verbatim symbol name, e.g. __imp_StackWalk64, __imp_SymSetOptions, etc.

If you have a little more experience, you'll realize that these are all Win32 functions and their common names are timeGetTime, StackWalk64, etc.

Then it just becomes a matter of finding these names in MSDN and scrolling to the bottom of the page to see the corresponding libraries to these missing functions.

For example, I believe in this particular case, you are failing to link with winmm.lib, dbghelp.lib, and shlwapi.lib (at least.)