HolidayXue / googletest

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

Unresolved externals when building with vs2008 #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Converted your sln to VS2008
2. Only gtest and gtest_environment_test build without errors
3. All other projects have unresolved externals

gtest 1.0.1. on 64-bit Vista with Visual Studio 2008 Professional

Original issue reported on code.google.com by popiz...@gmail.com on 3 Aug 2008 at 7:27

GoogleCodeExporter commented 9 years ago
Please provide more info on what errors you saw.  Thanks.

Original comment by shiq...@gmail.com on 5 Aug 2008 at 7:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have the same problem. Do you have a suggestion or solution for the errors?

Original comment by jozsef.d...@gmail.com on 19 Aug 2008 at 9:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Working solution:

1. Convert solution and all the projects by opening it in Visual Studio
2. gtest_main properties -> Librarian -> Output file -> set to gtest_main.lib 
(Debug
and Release)
3. Tools -> Options -> Projects and Solutions -> Build and run -> Maximum 
number of
parallel project builds set to 1
4. To remove LNK4204 select all project and open properties -> General ->
Intermediate Directory -> Change from Debug to Debug\$(TargetName) and from 
Release
to Release\$(TargetName)

The following errors and warnings appear when building solution on 
multiprocessor
machine and the above setting is set to 2 or more:

Command line error D8022 : cannot open 
'gtest-1.0.1\msvc\Release\RSP00015340523284.rsp'
Could not delete file 'gtest-1.0.1\msvc\Release\vc90.pdb'.
fatal error LNK1181: cannot open input file '.\release\gtest_main.lib'
Build log could not be opened for writing.

Solution now builds with zero errors an zero warnings in Debug and Release.

Original comment by popiz...@gmail.com on 19 Aug 2008 at 8:16

GoogleCodeExporter commented 9 years ago
We still don't know what error messages you saw, but it looks like an error we
already fixed in the head revision.  It should be part of the next release.  I'm
gonna close the issue for now.  Please reopen it if you still see the problem 
in the
next release (1.1.0, I think), which should occur  in a couple of weeks.

Original comment by shiq...@gmail.com on 8 Sep 2008 at 11:33

GoogleCodeExporter commented 9 years ago
This issue is still present.  I had to manually follow step #3 to set Max 
number of
parallel builds to 1 with VS2k8 Pro.

Maybe this isn't an issue that shows up with VS2k8 Express. I don't believe it
supports parallel builds.

Original comment by garen.pa...@gmail.com on 8 Sep 2009 at 5:57