Building google test as a DLL in Visual Studio 2022 linking errors

I just cloned https://github.com/google/googletest, created a new visual studio (2022 professional) DLL project and copied directories https://github.com/google/googletest/tree/main/googletest/include/ and https://github.com/google/googletest/tree/main/googletest/src into the project folder and added $(ProjectDir);$(ProjectDir)include to the project’s “Properties –> C++ –> Additional Include Directories” and then replaced all #include "gtest/ with #include "../include/gtest/ and all #include "src/ with #include "../src/ and built the project. Compilation went fine but linking did not as I had roughly 400 linking errors :

1>gtest-assertion-result.obj : error LNK2005: "public: __cdecl testing::AssertionResult::AssertionResult(class testing::AssertionResult const &)" (??0AssertionResult@testing@@QEAA@AEBV01@@Z) already defined in gtest-all.obj
1>gtest-assertion-result.obj : error LNK2005: "public: class testing::AssertionResult __cdecl testing::AssertionResult::operator!(void)const " (??7AssertionResult@testing@@QEBA?AV01@XZ) already defined in gtest-all.obj
1>gtest-assertion-result.obj : error LNK2005: "class testing::AssertionResult __cdecl testing::AssertionFailure(class testing::Message const &)" (?AssertionFailure@testing@@YA?AVAssertionResult@1@AEBVMessage@1@@Z) already defined in gtest-all.obj
1>gtest-assertion-result.obj : error LNK2005: "class testing::AssertionResult __cdecl testing::AssertionFailure(void)" (?AssertionFailure@testing@@YA?AVAssertionResult@1@XZ) already defined in gtest-all.obj
1>gtest-assertion-result.obj : error LNK2005: "class testing::AssertionResult __cdecl testing::AssertionSuccess(void)" (?AssertionSuccess@testing@@YA?AVAssertionResult@1@XZ) already defined in gtest-all.obj
1>gtest-assertion-result.obj : error LNK2005: "private: void __cdecl testing::AssertionResult::swap(class testing::AssertionResult &)" (?swap@AssertionResult@testing@@AEAAXAEAV12@@Z) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "public: __cdecl testing::internal::DeathTest::DeathTest(void)" (??0DeathTest@internal@testing@@QEAA@XZ) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "public: __cdecl testing::ExitedWithCode::ExitedWithCode(int)" (??0ExitedWithCode@testing@@QEAA@H@Z) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "public: bool __cdecl testing::ExitedWithCode::operator()(int)const " (??RExitedWithCode@testing@@QEBA_NH@Z) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "protected: virtual void __cdecl testing::internal::DeathTestImpl::Abort(enum testing::internal::DeathTest::AbortReason)" (?Abort@DeathTestImpl@internal@testing@@MEAAXW4AbortReason@DeathTest@23@@Z) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "public: virtual enum testing::internal::DeathTest::TestRole __cdecl testing::internal::WindowsDeathTest::AssumeRole(void)" (?AssumeRole@WindowsDeathTest@internal@testing@@UEAA?AW4TestRole@DeathTest@23@XZ) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "public: static bool __cdecl testing::internal::DeathTest::Create(char const *,class testing::Matcher<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &>,char const *,int,class testing::internal::DeathTest * *)" (?Create@DeathTest@internal@testing@@SA_NPEBDV?$Matcher@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@3@0HPEAPEAV123@@Z) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "public: virtual bool __cdecl testing::internal::DefaultDeathTestFactory::Create(char const *,class testing::Matcher<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &>,char const *,int,class testing::internal::DeathTest * *)" (?Create@DefaultDeathTestFactory@internal@testing@@UEAA_NPEBDV?$Matcher@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@3@0HPEAPEAVDeathTest@23@@Z) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "bool __cdecl testing::internal::ExitedUnsuccessfully(int)" (?ExitedUnsuccessfully@internal@testing@@YA_NH@Z) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "protected: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl testing::internal::DeathTestImpl::GetErrorLogs(void)" (?GetErrorLogs@DeathTestImpl@internal@testing@@MEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl testing::internal::GetLastErrnoDescription(void)" (?GetLastErrnoDescription@internal@testing@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) already defined in gtest-all.obj
1>gtest-death-test.obj : error LNK2005: "bool __cdecl testing::internal::InDeathTestChild(void)" (?InDeathTestChild@internal@testing@@YA_NXZ) already defined in gtest-all.obj
...
1>gtest.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > testing::FLAGS_gtest_stream_result_to" (?FLAGS_gtest_stream_result_to@testing@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) already defined in gtest-all.obj
1>gtest.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > testing::FLAGS_gtest_flagfile" (?FLAGS_gtest_flagfile@testing@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) already defined in gtest-all.obj
1>gtest.obj : error LNK2005: "void const * const testing::internal::kTestTypeIdInGoogleTest" (?kTestTypeIdInGoogleTest@internal@testing@@3QEBXEB) already defined in gtest-all.obj
1>C:Googletestx64DebugGoogletest.dll : fatal error LNK1169: one or more multiply defined symbols found

What am I doing wrong ?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật