You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiply defined symbol errors in libuv.lib and openssl.lib because of node.lib #1656
Scope (install, code, runtime, meta, other?): other (building)
Module (and version) (if relevant): N/A
I ran vcbuild with this command to generate project files: .\vcbuild release x64 noetw nobuild. Then I opened up Visual Studio, set the include file and library search paths--as well as changing the name of the input file to the linker to zlib.lib (and adding zlibstatic.lib in node.vcxproj)--in all the projects that have options for that, and then tried to build node_lib.vcxproj first which succeeded (I did this because the library files that were generated when I built zlib were zlib.lib and zlibstatic.lib; no z.lib). But building node.vcxproj failed with these errors:
38>libuv.lib(zlib.dll) : error LNK2005: �zlib_NULL_THUNK_DATA already defined in node.lib(zlib.dll)
38>libuv.lib(zlib.dll) : error LNK2005: __NULL_IMPORT_DESCRIPTOR already defined in node.lib(zlib.dll)
38>libuv.lib(zlib.dll) : error LNK2005: __IMPORT_DESCRIPTOR_zlib already defined in node.lib(zlib.dll)
38>openssl.lib(zlib.dll) : error LNK2005: �zlib_NULL_THUNK_DATA already defined in node.lib(zlib.dll)
38>openssl.lib(zlib.dll) : error LNK2005: __NULL_IMPORT_DESCRIPTOR already defined in node.lib(zlib.dll)
38>openssl.lib(zlib.dll) : error LNK2005: __IMPORT_DESCRIPTOR_zlib already defined in node.lib(zlib.dll)
38>C:\node\Release\node.exe : fatal error LNK1169: one or more multiply defined symbols found
And there's also this linker warning:
LIBCMT.lib(initializers.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
Someone please help me out here. Thanks in advance. [Note: I closed the other issues about this because they were either not needed anymore or I'd already partially solved them at least.]
I didn't put in the path to /Release/bin, so why is it seeing zlib.dll which is in that directory? I wonder if I should specify static when generating the project files?
I tried to build the other projects before the main node.vcxproj one. But node.vcxproj keeps failing with linker errors. I have the log file. Gist link: https://gist.github.com/DragonOsman/ea32bd66414064d5c390854ce3ac1db2 . The reason it's so long with so much info is because I chose the setting for the most detailed diagnostic in MSBuild. It gives you info on the whole build environment everything too, not just on the build information.
Activity
DragonOsman commentedon Dec 6, 2018
I didn't put in the path to /Release/bin, so why is it seeing zlib.dll which is in that directory? I wonder if I should specify
staticwhen generating the project files?DragonOsman commentedon Dec 6, 2018
I tried to build the other projects before the main node.vcxproj one. But node.vcxproj keeps failing with linker errors. I have the log file. Gist link: https://gist.github.com/DragonOsman/ea32bd66414064d5c390854ce3ac1db2 . The reason it's so long with so much info is because I chose the setting for the most detailed diagnostic in MSBuild. It gives you info on the whole build environment everything too, not just on the build information.
Anyway, I'd really like some help here.
gireeshpunathil commentedon Jun 18, 2019
ping @DragonOsman - is this still an issue for you?
gireeshpunathil commentedon Jul 1, 2019
inactive, closing
doc: add tips about vcpkg cause build faild on windows
doc: add tips about vcpkg cause build faild on windows
doc: add tips about vcpkg cause build faild on windows