Ah OK. As others have discovered, you simply need to link in both 
v8_base_0.lib and v8_base_1.lib and it works now. Great!

On Monday, May 7, 2018 at 3:57:31 PM UTC-4, Steven An wrote:
>
> Hi all,
> I'm getting similar errors on Windows, VS 2017, when building for static 
> link:
>
> [520/529] LINK cctest.exe cctest.exe.pdb
> FAILED: cctest.exe cctest.exe.pdb
> C:/Users/stevenan/gh/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe 
> ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 
> False link.exe /nologo /OUT:./cctest.exe /PDB:./cctest.exe.pdb 
> @./cctest.exe.rsp
> LINK : warning LNK4001: no object files specified; libraries used
> LINK : error LNK1218: warning treated as error; no output file generated
> [525/529] LINK v8_simple_wasm_globals_section_fuzzer.exe 
> v8_simple_wasm_globals_section_fuzzer.exe.pdb
> ninja: build stopped: subcommand failed.
>
>
> The build does totally succeed if I build without these gn args:
>
> is_component_build = false
> v8_static_library = true
>
>
> But this does not produce v8_base.lib. All other libs I need appear to be 
> there, but not v8_base.lib. I do however see v8_base_0.lib and 
> v8_base_1.lib - are those useable..?
>
> On Friday, April 27, 2018 at 7:06:17 PM UTC-4, A.M. wrote:
>>
>> I have two questions related to building the v8 as a static library. 
>>
>> *1*. I'm building on Windows and the build fails very close to the end 
>> with this output:
>>
>> ninja -C out.gn/x64.debug
>> ninja: Entering directory `out.gn/x64.debug'
>> [1/1] Regenerating ninja files
>> [1441/1543] LINK unittests.exe unittests.exe.pdb
>> FAILED: unittests.exe unittests.exe.pdb
>> C:/dev/v8/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe 
>> ../../build/toolchain/win/tool_wrapper.py 
>>     link-wrapper environment.x64 False link.exe /nologo 
>> /OUT:./unittests.exe /PDB:./unittests.exe.pdb @./unittests.exe.rsp
>> LINK : warning LNK4001: no object files specified; libraries used
>> LINK : error LNK1218: warning treated as error; no output file generated
>> [1446/1543] CXX obj/test/cctest/cctest_sources/test-code-generator.obj
>> ninja: build stopped: subcommand failed.Enter code here...
>>
>> Apparently, no object files were supplied to the linker, only libraries, 
>> which is a warnings, but warnings are treated as errors, hence it fails the 
>> build. By the time it reaches this point, all v8 libraries are built, so I 
>> can use the v8 for my purposes, but it would be nice if it built as it is 
>> supposed to. 
>>
>> Anybody has any idea how to remedy this problem?
>>
>> *2*. Static v8 libraries are build against static VC++ CRT (i.e. with 
>> the `/MT` and `/MTd` flags), which means that they will not pick up any 
>> security updates from MS and also that the project cannot share memory C++ 
>> allocations (i.e. `malloc`/`operator new`), CRT callbacks and some other 
>> things with the rest of the code, so it would need to be completely 
>> encapsulated within its own DLL. I found a really old thread from 2012:
>>
>> https://groups.google.com/forum/#!topic/v8-users/PpA3mhICTiM
>>
>> , but it's just too old to be of any significance. 
>>
>> Is there a way to build v8 static libraries against VC++ DLL CRT (i.e. 
>> with `/MD` and `/MDd` flags)?
>>
>> Thanks!
>>
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to