Unable to build CppUTest solution in Visual Studio 14 2015

491 views
Skip to first unread message

Simon Cotts

unread,
Aug 10, 2016, 10:02:20 AM8/10/16
to cpputest
Hello,

I've managed to get CMake (3.6.1) to generate a C++11 solution for CppUTest (3.8) in Visual Studio 14 2015, but the project is failing to build with errors I've haven't seen posted before (to the best of my knowledge...)

I did try the solution from "Error while building solution" as it also contained MSB3073 errors, but it didn't change anything.

Please find attached  vs2015_ALL_BUILD_output.txt containing the entire build output.


Error MSB3073: ZERO_CHECK

1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
1>  Checking Build System
1>  CMake does not need to re-run because C:/cpputest-3.8/bin/CMakeFiles/generate.stamp is up-to-date.
1>  CMake does not need to re-run because C:/cpputest-3.8/bin/src/CppUTest/CMakeFiles/generate.stamp is up-to-date.
1>  CMake does not need to re-run because C:/cpputest-3.8/bin/src/CppUTestExt/CMakeFiles/generate.stamp is up-to-date.
1>  CMake does not need to re-run because C:/cpputest-3.8/bin/tests/CMakeFiles/generate.stamp is up-to-date.
1>  CMake does not need to re-run because C:/cpputest-3.8/bin/tests/CppUTestExt/CMakeFiles/generate.stamp is up-to-date.
1>  'C:\cpputest-3.8\bin\Debug\ZERO_CHECK' is not recognized as an internal or external command,
1>  operable program or batch file.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "C:\cpputest-3.8\bin\Debug\ZERO_CHECK
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 9009.
 

Error MSB3073: CppUTest.lib, CppUTestExt.lib

2>------ Build started: Project: CppUTest, Configuration: Debug Win32 ------
3>------ Build started: Project: CppUTestExt, Configuration: Debug Win32 ------ 
... 
3>  CppUTestExt.vcxproj -> C:\cpputest-3.8\bin\src\CppUTestExt\Debug\CppUTestExt.lib
2>  SimpleMutex.cpp
2>  Utest.cpp
2>  UtestPlatform.cpp
2>  Generating Code...
2>  CppUTest.vcxproj -> C:\cpputest-3.8\bin\src\CppUTest\Debug\CppUTest.lib
2>  The system cannot execute the specified program.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "C:\cpputest-3.8\bin\src\CppUTest\Debug\CppUTest.lib
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 9020. 
... 
3>  The system cannot execute the specified program.
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "C:\cpputest-3.8\bin\src\CppUTestExt\Debug\CppUTestExt.lib
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 9020.
 

Error C2220: no 'object' file generated

5>C:\cpputest-3.8\tests\CppUTestExt\MockSupport_cTestCFile.c(103): error C2220: warning treated as error - no 'object' file generated
5>C:\cpputest-3.8\tests\CppUTestExt\MockSupport_cTestCFile.c(103): warning C4244: 'function': conversion from 'double' to 'unsigned int', possible loss of data
5>C:\cpputest-3.8\tests\CppUTestExt\MockSupport_cTestCFile.c(107): warning C4244: 'function': conversion from 'double' to 'long', possible loss of data
5>C:\cpputest-3.8\tests\CppUTestExt\MockSupport_cTestCFile.c(111): warning C4244: 'function': conversion from 'double' to 'unsigned long', possible loss of data
 
 
Error MSB3073: ALL_BUILD

5>  Generating Code... 
6>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------
6>  Building Custom Rule C:/cpputest-3.8/CMakeLists.txt
6>  CMake does not need to re-run because C:\cpputest-3.8\bin\CMakeFiles\generate.stamp is up-to-date.
6>  'C:\cpputest-3.8\bin\Debug\ALL_BUILD' is not recognized as an internal or external command,
6>  operable program or batch file.
6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "C:\cpputest-3.8\bin\Debug\ALL_BUILD
6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 9009.
========== Build: 1 succeeded, 5 failed, 0 up-to-date, 0 skipped ==========
vs2015_ALL_BUILD_output.txt

Martin Ertsås

unread,
Aug 11, 2016, 3:35:35 AM8/11/16
to cpputest
This seems strange. Now, I don't work in Visual Studio, so I can only guess on what it actually does. But to me it looks like it's trying to execute the resulting .lib file, which of course is not an executable. I'll have a look and see if I have a VM I can test a bit on.

--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simon Cotts

unread,
Aug 12, 2016, 3:06:37 AM8/12/16
to cpputest
Thanks! Let me know if you'd like me to try anything on my system.

Simon Cotts

unread,
Aug 22, 2016, 9:41:23 AM8/22/16
to cpputest
A question about the CMake method if I may: is the make step necessary?

I've been playing around with the different methods of installation and re-read the steps mentioned on the GitHub page:

You can also use CMake, which also works for Windows Visual Studio.

  • Download latest version
  • cmake CMakeList.txt
  • make
I've tried using the command-line method in both command prompt and Cygwin, but no Makefile (at least not one that's automatically detected) is ever generated.

(FYI: I've also tried the autogen > configure > make method in both command prompt with MinGW and Cygwin, but that's running into its own problems.)

Martin Ertsås

unread,
Aug 22, 2016, 9:44:28 AM8/22/16
to cpputest
The make step is necessary for linux. cmake tries to find the best generator, which I guess is VS for windows. To have it build a makefile you need to add -G "Unix Mkaefiles" or something to the commandline

Simon Cotts

unread,
Nov 14, 2016, 12:59:08 PM11/14/16
to cpputest
Hello,

It's been a while, but I don't suppose anyone's found a solution to this?

Cale McCollough

unread,
May 1, 2018, 10:41:54 PM5/1/18
to cpputest
Visual Studio has a NASTY habit of breaking your C++ file dependencies when the Windows SDK gets updated. The solution I've found is to download the Windows 10 SDK, and install it. That will fix the broken file links (not sure if that is the issue but it's a chronic problem.). Step two is to ensure you're using x64 mode for BOTH CppUTest AND your project. It is HIGHLY suggested to ONLY work in x64 mode. Second you will want to retarget your project to the Windows 10 SDK version we just installed. Then open up "CppUTest_VS201x.sln", retarget CppUTest to the same version we retargeted your project for, then click Build-Build Batch, then select the x64 debug and release and build those two. From there go back to your project and link to the CppUTest.lib, CppUTestd.lib, AND Winmm.lib (used to get timestamps.). It should work after that.
Reply all
Reply to author
Forward
0 new messages