yaml-cpp icon indicating copy to clipboard operation
yaml-cpp copied to clipboard

Couldn't build Branch Master

Open Xuzheng77s opened this issue 4 years ago • 5 comments

[57/60] Linking CXX shared library bin\gmockd.dll FAILED: bin/gmockd.dll lib/gmockd.lib cmd.exe /C "cd . && C:\PROGRA~1\LLVM\bin\CLANG_~1.EXE -fuse-ld=lld-link -nostartfiles -nostdlib -g -Xclang -gcodeview -O0 -D_DEBUG -Xclang -flto-visibility-public-std -D_MT -Xclang --dependent-lib=libcmtd -shared -o bin\gmockd.dll -Xlinker /implib:lib\gmockd.lib -Xlinker /pdb:bin\gmockd.pdb -Xlinker /version:0.0 test/prefix/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.obj lib/gtestd.lib -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames && cd ." lld-link: error: undefined symbol: bool __cdecl testing::internal::ParseInt32(class testing::Message const &, char const *, int *)

referenced by C:\Users\Administrator\Downloads\yaml-cpp-master\yaml-cpp-master\test\gtest-1.10.0\googlemock\src\gmock.cc:135 test/prefix/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.obj:(bool __cdecl testing::internal::ParseGoogleMockIntFlag(char const *, char const *, int *)) clang++: error: linker command failed with exit code 1 (use -v to see invocation) [58/60] Linking CXX shared library bin\gtest_maind.dll ninja: build stopped: subcommand failed.

Xuzheng77s avatar Aug 12 '20 05:08 Xuzheng77s

Could you provide more details? I can build the master branch well in my environment.

dota17 avatar Aug 12 '20 06:08 dota17

Yes,Operating System:Windows

Xuzheng77s avatar Aug 12 '20 08:08 Xuzheng77s

I'm using clang

Xuzheng77s avatar Aug 12 '20 11:08 Xuzheng77s

我在用Visual Studio Visual Studio 2020的时候也不行啊!!!!!!也是这个错误啊,就是不能构建!

Xuzheng77s avatar Aug 21 '20 09:08 Xuzheng77s

I'm on Ubuntu 21.10 with g++ 11.2. I couldn't build master branch with cmake -DBUILD_SHARED_LIBS=ON .., with the error similar to the above one. Though I could build with cmake -DYAML_BUILD_SHARED_LIBS=ON ...

Seems there's an related issue of googletest: https://github.com/google/googletest/issues/2864 After replacing the test/gtest-1.10.0 directory with the master of googletest, I'm able to build without this error.

function2-llx avatar Oct 20 '21 04:10 function2-llx