yaml-cpp
yaml-cpp copied to clipboard
Couldn't build Branch Master
[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.
Could you provide more details? I can build the master branch well in my environment.
Yes,Operating System:Windows
I'm using clang
我在用Visual Studio Visual Studio 2020的时候也不行啊!!!!!!也是这个错误啊,就是不能构建!
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.