Frankenmint / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

gtest cannot build the gtest_dll_test project #380

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Used CMake to create MSVS 9 Solution file with the following command: cd 
CMake\win-x64 && CMake -G "Visual Studio 9 2008 Win64" -Dgtest_build_tests=ON 
..\..
2. Build the solution with the following command: cd CMake\win-x64 && vcbuild 
gtest.sln "Release|x64"

What is the expected output? What do you see instead?
I expect everything to build with no failures or errors.  What I got was a 
"c:\p4\tools\3rdparty\gtest\include\gtest\gtest.h(1449) : fatal error C1128: 
number of sections exceeded object file format limit : compile with /bigobj" 
error while building Project gtest_dll_test_

What version of Google Test are you using? On what operating system?
Using gtest version 1.6.0 on Windows Vista x64

Original issue reported on code.google.com by BitO...@gmail.com on 13 Sep 2011 at 8:10

Attachments:

GoogleCodeExporter commented 8 years ago
The /bigobj option is not supported on VC 7.1, and will need to be applied 
conditionally. This makes the build file more complex, and a simpler solution 
is preferable. Can you check whether compiling the gtest library as multiple 
source files instead of just one fixes the issue? Here is the patch to apply:

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt  (revision 592)
+++ CMakeLists.txt  (working copy)
@@ -67,7 +67,13 @@
 # Google Test libraries.  We build them using more strict warnings than what
 # are used for other targets, to ensure that gtest can be compiled by a user
 # aggressive about warnings.
-cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
+cxx_library(gtest "${cxx_strict}" src/gtest.cc
+                                  src/gtest-death-test.cc
+                                  src/gtest-filepath.cc
+                                  src/gtest-port.cc
+                                  src/gtest-printers.cc
+                                  src/gtest-test-part.cc
+                                  src/gtest-typed-test.cc)
 cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
 target_link_libraries(gtest_main gtest)

Original comment by vladlosev on 22 Sep 2011 at 7:47

GoogleCodeExporter commented 8 years ago
Closed for the lack of reporter's response.

Original comment by vladlosev on 16 Oct 2011 at 5:00