Microsoft.Cpp.Win32.Targets(62,5): error : Required file "" is missing - c++

Today, I went to create a new C++ project in Visual Studio 2010 Pro, and then I compile it, I'm getting the following two errors:
1 error : Required file "" is missing. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets 62 6 Test
2 IntelliSense: cannot open source file "SDKDDKVer.h" c:\users\champad\documents\applications\leadinghedge-rebuild\leadinghedge\test\targetver.h 8 1 Test
The first error points to this tag in the Microsoft.Cpp.Win32.Targets file:
<CL Condition="'%(ClCompile.PrecompiledHeader)' == 'Create' and '%(ClCompile.ExcludedFromBuild)'!='true'"
BuildingInIDE ="$(BuildingInsideVisualStudio)"
Sources ="#(ClCompile)"
AdditionalIncludeDirectories ="%(ClCompile.AdditionalIncludeDirectories)"
AdditionalOptions ="%(ClCompile.AdditionalOptions)"
AdditionalUsingDirectories ="%(ClCompile.AdditionalUsingDirectories)"
AssemblerListingLocation ="%(ClCompile.AssemblerListingLocation)"
AssemblerOutput ="%(ClCompile.AssemblerOutput)"
BasicRuntimeChecks ="%(ClCompile.BasicRuntimeChecks)"
BrowseInformation ="%(ClCompile.BrowseInformation)"
BrowseInformationFile ="%(ClCompile.BrowseInformationFile)"
BufferSecurityCheck ="%(ClCompile.BufferSecurityCheck)"
CallingConvention ="%(ClCompile.CallingConvention)"
CompileAsManaged ="%(ClCompile.CompileAsManaged)"
CompileAs ="%(ClCompile.CompileAs)"
DebugInformationFormat ="%(ClCompile.DebugInformationFormat)"
DisableLanguageExtensions ="%(ClCompile.DisableLanguageExtensions)"
DisableSpecificWarnings ="%(ClCompile.DisableSpecificWarnings)"
EnableEnhancedInstructionSet ="%(ClCompile.EnableEnhancedInstructionSet)"
EnableFiberSafeOptimizations ="%(ClCompile.EnableFiberSafeOptimizations)"
EnablePREfast ="%(ClCompile.EnablePREfast)"
ErrorReporting ="%(ClCompile.ErrorReporting)"
ExceptionHandling ="%(ClCompile.ExceptionHandling)"
ExcludedInputPaths ="$(ExcludePath)"
ExpandAttributedSource ="%(ClCompile.ExpandAttributedSource)"
FavorSizeOrSpeed ="%(ClCompile.FavorSizeOrSpeed)"
FloatingPointExceptions ="%(ClCompile.FloatingPointExceptions)"
FloatingPointModel ="%(ClCompile.FloatingPointModel)"
ForceConformanceInForLoopScope ="%(ClCompile.ForceConformanceInForLoopScope)"
ForcedIncludeFiles ="%(ClCompile.ForcedIncludeFiles)"
ForcedUsingFiles ="%(ClCompile.ForcedUsingFiles)"
FunctionLevelLinking ="%(ClCompile.FunctionLevelLinking)"
GenerateXMLDocumentationFiles ="%(ClCompile.GenerateXMLDocumentationFiles)"
IgnoreStandardIncludePath ="%(ClCompile.IgnoreStandardIncludePath)"
InlineFunctionExpansion ="%(ClCompile.InlineFunctionExpansion)"
IntrinsicFunctions ="%(ClCompile.IntrinsicFunctions)"
MinimalRebuild ="%(ClCompile.MinimalRebuild)"
MultiProcessorCompilation ="%(ClCompile.MultiProcessorCompilation)"
ObjectFileName ="%(ClCompile.ObjectFileName)"
OmitDefaultLibName ="%(ClCompile.OmitDefaultLibName)"
OmitFramePointers ="%(ClCompile.OmitFramePointers)"
OpenMPSupport ="%(ClCompile.OpenMPSupport)"
Optimization ="%(ClCompile.Optimization)"
PrecompiledHeader ="%(ClCompile.PrecompiledHeader)"
PrecompiledHeaderFile ="%(ClCompile.PrecompiledHeaderFile)"
PrecompiledHeaderOutputFile ="%(ClCompile.PrecompiledHeaderOutputFile)"
PreprocessKeepComments ="%(ClCompile.PreprocessKeepComments)"
PreprocessorDefinitions ="%(ClCompile.PreprocessorDefinitions)"
PreprocessSuppressLineNumbers ="%(ClCompile.PreprocessSuppressLineNumbers)"
PreprocessToFile ="%(ClCompile.PreprocessToFile)"
ProcessorNumber ="%(ClCompile.ProcessorNumber)"
ProgramDataBaseFileName ="%(ClCompile.ProgramDataBaseFileName)"
RuntimeLibrary ="%(ClCompile.RuntimeLibrary)"
RuntimeTypeInfo ="%(ClCompile.RuntimeTypeInfo)"
ShowIncludes ="%(ClCompile.ShowIncludes)"
SmallerTypeCheck ="%(ClCompile.SmallerTypeCheck)"
StringPooling ="%(ClCompile.StringPooling)"
StructMemberAlignment ="%(ClCompile.StructMemberAlignment)"
SuppressStartupBanner ="%(ClCompile.SuppressStartupBanner)"
TreatSpecificWarningsAsErrors ="%(ClCompile.TreatSpecificWarningsAsErrors)"
TreatWarningAsError ="%(ClCompile.TreatWarningAsError)"
TreatWChar_tAsBuiltInType ="%(ClCompile.TreatWChar_tAsBuiltInType)"
UndefineAllPreprocessorDefinitions ="%(ClCompile.UndefineAllPreprocessorDefinitions)"
UndefinePreprocessorDefinitions ="%(ClCompile.UndefinePreprocessorDefinitions)"
UseFullPaths ="%(ClCompile.UseFullPaths)"
UseUnicodeForAssemblerListing ="%(ClCompile.UseUnicodeForAssemblerListing)"
WarningLevel ="%(ClCompile.WarningLevel)"
WholeProgramOptimization ="%(ClCompile.WholeProgramOptimization)"
XMLDocumentationFileName ="%(ClCompile.XMLDocumentationFileName)"
CreateHotpatchableImage ="%(CLCompile.CreateHotpatchableImage)"
TrackerLogDirectory ="%(ClCompile.TrackerLogDirectory)"
TLogReadFiles ="#(CLTLogReadFiles)"
TLogWriteFiles ="#(CLTLogWriteFiles)"
ToolExe ="$(CLToolExe)"
ToolPath ="$(CLToolPath)"
TrackFileAccess ="$(TrackFileAccess)"
MinimalRebuildFromTracking ="%(ClCompile.MinimalRebuildFromTracking)"
ToolArchitecture ="$(CLToolArchitecture)"
TrackerFrameworkPath ="$(CLTrackerFrameworkPath)"
TrackerSdkPath ="$(CLTrackerSdkPath)"
TrackedInputFilesToIgnore ="#(ClNoDependencies)"
AcceptableNonZeroExitCodes ="%(ClCompile.AcceptableNonZeroExitCodes)"
YieldDuringToolExecution ="$(ClYieldDuringToolExecution)"
>
</CL>
I tried reinstalling the 7.1 SDK, however the installation files every time I try it. Is that what is causing this?

This fixed it for me:
First, I had an error where it couldn't find the WindowSDKDir property. I had to go to my project's settings->Configuration Properties->General->Platform Toolset and change it to Windows7.1SDK.
Then, I had the Required file "" is missing error. I had to open regedit and change:
HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\CurrentInstallFolder
from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1\ to C:\Program Files\Microsoft SDKs\Windows\v7.1\ (removed (x86)).
After that, CL.exe was exiting with code -1073741515. I had to add the following to my PATH:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
After all that work, it turns out the project I'm building is using some include files that only come with Visual Studio 2010, so I have to go install the whole dang thing anyway.
Hopefully this is of help to someone else, and I haven't just wasted my afternoon. :P

Related

Trying to build GDAL from github using Visual Studio 2019 v16.6.5 on Windows 10 x64

I want to use Visual Studio 2019 to build GDAL. But I keep getting errors when trying to build.
The computer I'm using is Acer Aspire f 15 F5573G-72CP,
CPU is i7 7500U 2.7GHz, RAM is 16GB, OS is Windows 10 64 bit
Steps I've taken are:
Download Visual Studio Community, included .NET desktop development, Universal Windows Platform development, Desktop development with C++ and Node.js development.
Used GIT BASH from git for windows to pull the repo https://github.com/OSGeo/GDAL.git and located it c:/gdal
in c:/gdal/GDAL/nmake.opt:
3.a. changed line 42 to Line 42: MSVC_VER=1926
3.b. I uncommented line 260:
Line 259: # PROJ stuff (required dependency: PROJ >= 6)
Line 260: PROJ_INCLUDE = -Id:\install-proj\local\include
3.c. Uncommented line 213: Line 213: WIN64=YES
Also pulled the repo: https://github.com/OSGeo/PROJ.git located at c:/proj/PROJ
Using Windows Powershell, cd c:/gdal/gdal -> generate_vcxproj.bat 16.0 64 gdal_vs2019
which outputs the following:
PS C:\gdal\gdal> .\generate_vcxproj.bat 16.0 64 gdal_vs2019
The system cannot find the path specified.
Generating:
"C:\gdal\gdal\gdal_vs2019.vcxproj"
"C:\gdal\gdal\gdal_vs2019.vcxproj.user"
"C:\gdal\gdal\gdal_vs2019.vcxproj.filters"
"C:\gdal\autotest\cpp\gdal_vs2019_test.vcxproj"
"C:\gdal\autotest\cpp\gdal_vs2019_test.vcxproj.user"
"C:\gdal\autotest\cpp\gdal_vs2019_test.vcxproj.filters"
This might take a little while...
Projects done!
Launch Visual Studio IDE
* Open project "C:\gdal\gdal\gdal_vs2019.vcxproj"
* Add project "C:\gdal\autotest\cpp\gdal_vs2019_test.vcxproj"
* Configure Build Dependencies to build the main project before the test project.
* Save solution in .sln file
Done!
PS C:\gdal\gdal>
Open Visual Studio 2019, open a project or solution, select C:\gdal\gdal\gdal_vs2019.vcxproj, ensure Solution Platforms dropdown is set to x64, Build->Build Solution, which returns three errors:
Severity Code Description Project File Line Suppression State
Error U1077 'call' : return code '0x1' gdal_vs2019 C:\gdal\gdal\NMAKE 1
Severity Code Description Project File Line Suppression State
Error U1077 '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\nmake.EXE"' : return code '0x2' gdal_vs2019 C:\gdal\gdal\NMAKE 1
Severity Code Description Project File Line Suppression State
Error MSB3073 The command "chcp 65001 >NUL && nmake -f makefile.vc MSVC_VER=1926 WIN64=1 DEBUG=1 WITH_PDB=1" exited with code 2. gdal_vs2019 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets 46
The Output tab shows:
1>------ Build started: Project: gdal_vs2019, Configuration: Debug x64 ------
1>
1>Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cd port
1> nmake /nologo /f makefile.vc
1> call prev_dllbuild.bat
1>The system cannot find the path specified.
1>
1>C:\gdal\gdal\port>IF NOT EXIST dllbuild.prev (ECHO 1 ) 1>dllbuild.prev
1>
1>C:\gdal\gdal\port>SET /P PREV_DLLBUILD= 0<dllbuild.prev
1>
1>C:\gdal\gdal\port>IF NOT "1" == "1" (ECHO 1 ) 1>dllbuild.prev
1>NMAKE : fatal error U1077: 'call' : return code '0x1'
1>Stop.
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\nmake.EXE"' : return code '0x2'
1>Stop.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command "chcp 65001 >NUL && nmake -f makefile.vc MSVC_VER=1926 WIN64=1 DEBUG=1 WITH_PDB=1" exited with code 2.
1>Done building project "gdal_vs2019.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
How should I address these errors to get GDAL built successfully?
This is a little late, but have you tried the following:
Read https://trac.osgeo.org/gdal/wiki/BuildingOnWindows
Read https://trac.osgeo.org/gdal/wiki/BuildHints for specific
needs/dependencies/drivers
Get all the dependencies you need
Edit nmake.opt to disable/enable features/drivers you don't
need
Run NMAKE
You could also try cleaning:
nmake /f makefile.vc clean
nmake /f makefile.vc
Finally, you could try building on a different computer.
Hark, this is the way one should ask questions: clear, precise steps, detailed description. Very helpful!
I could compile when I didn't use the GIT repo. Instead I downloaded PROJ following their Windows installation documentation:
The simplest way to install PROJ on Windows is to use the OSGeo4W_
software distribution. OSGeo4W provides easy access to many popular
open source geospatial software packages. After installation you can
use PROJ from the OSGeo4W shell. To install PROJ do the following:
note::
If you have already installed software via OSGeo4W on your computer, or if
you have already installed QGIS on your computer, it is likely that PROJ is
already installed. Type "OSGeo4W Shell" in your start menu and check whether
that gives a match.
Download either the 32 bit or 64 bit installer.
Run the OSGeo4W setup program.
Select "Advanced Install" and press Next.
Select "Install from Internet" and press Next.
Select a installation directory. The default suggestion is fine in most cases. Press Next.
Select "Local package directory". The default suggestion is fine in most cases. Press Next.
Select "Direct connection" and press Next.
Choose the download.osgeo.org server and press Next.
Find "proj" under "Commandline_Utilities" and click the package in the "New" column until the version you want to install appears.
Press next to install PROJ.
I downloaded the installers from osgeo4W. Because I needed both 32 and 64 bit versions I downloaded osgeo4w-setup-x86-v1.exe and osgeo4w-setup-x86_64-v1.exe. The download got stuck after 25% when downloading the big proj-file from osgeo, so I selected the oslandia download link instead. This initially fails (at least for me), but after restart it could finish.
In the download package selection click on the "Skip" logo to select binary ("B") and source ("S"). I selected both. I downloaded "proj", "proj-dev" and "proj-dev-data", not sure what is actually neeeded. When it asked to include dependencies (a lot), I selected to include them.
In the nmake.opt (your step 3) I used for the 32 bit:
PROJ_INCLUDE = -IC:\OSGeo4W\include
PROJ_LIBRARY = C:\OSGeo4W\lib\proj.lib
and for the 64 bit:
PROJ_INCLUDE = -IC:\OSGeo4W64\include
PROJ_LIBRARY = C:\OSGeo4W64\lib\proj.lib
For running the generate_vcxproj.bat, I used Visual Studio 2022 x86 and x64 native tool command prompts. In the bat-file I changed:
if "%_vcver_%"=="16.0" (
set _clver_=1926
set _vstoolset_=v143
And in the nmake.opt:
MSVC_VER=1929
I run the bat separately for 64 and 32 bits:
generate_vcxproj.bat 16.0 64 gdal_vs2022
generate_vcxproj.bat 16.0 32 gdal_vs2022_x86
After this step I could open the vcxproj-files in Visual Studio and compile the libraries. I used the genererated gdal_i.lib's and accompanying gdal303.dll's in my project.

Error compiling Unreal Engine 4.24.1 after updating visual studio 2019

I'm having a weird error after updating Visual Studio 2019 Community from v16.4.5 to 16.5. Even a fresh install of the engine will no longer build. I'm getting the errors listed below. The build doesn't fail until the end of compiling all modules:
Error C4800 Implicit conversion from 'ADODB::_Recordset *const ' to bool. Possible information loss UE4 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\INCLUDE\comip.h 311
Error C4800 Implicit conversion from 'ADODB::_Connection *const ' to bool. Possible information loss UE4 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\INCLUDE\comip.h 311
Error MSB3075 The command "..\..\Build\BatchFiles\Build.bat -Target="UE4Editor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command. UE4 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets 44
I have not changed or updated anything on the Unreal Engine-side of the code. This error occurs during a build of UE4.sln, sourced from Epic's github repo. The build doesn't fail until all modules are built (it fails at the end of the build).
Seeing as Microsoft doesn't have archives of installers for VS Community, only Enterprise and Pro, I'm kind of suddenly stuck here because I can't just uninstall 16.5 and reinstall 16.4.5 (which is the last working version I was on before the update).
I heard sometimes setting "treat warnings as errors" to false can help, but I don't see a way to do that in Visual Studio.
Any insight into this would be helpful, Thanks!
So, turns out something changed on VS2019's side in the update from 16.4.5 to 16.5, but the fix for UE4 can be found in this commit on the 4.25 branch. Confirmed that this solved my problem!
First Make a backup of your whole project (just copy it to somewhere else).
Afterwards delete the following folders in the project directory:-
.vs
Intermediate
Saved
you just need to delete the .vs folder to solve the problem. The rest are just for a quick refresh of your project.
Next open Unreal Engine 4, then under File tab click on Refresh Visual Studio Project. On completion try to compile again. This should solve your problem.
For those who facing the same problem, here is the solution.
Step 1:
open the file ADOSupport.cpp on [YourEngineSourceDir]\Engine\Plugins\Runtime\Database\ADOSupport\Source\ADOSupport\Private
Step 2:
go to line 255 and modify it
from if(ADORecordSet && (ADORecordSet->State & ADODB::adStateOpen))
to if(ADORecordSet != nullptr && (ADORecordSet->State & ADODB::adStateOpen))
Step 3:
got to line 328 and modify it from if( DataBaseConnection && (DataBaseConnection->State & ADODB::adStateOpen)) to if( DataBaseConnection != nullptr && (DataBaseConnection->State & ADODB::adStateOpen))
Step 4: Build the solution and enjoy!
You should add the new line of code, like on the video tutorial:
Arguments.Add("/wd4800"); // 4800: Implicit conversion from 'type' to bool. Possible information
https://youtu.be/KXIv4y51fyw
That fix me that issue.
I had the same issue, and this solved it:
File Path
YOURENGINEPASS\Engine\Source\Programs\UnrealBuildTool\Platform\Windows
File to change
VCToolChain.cs
After line 456 add the following line:
Arguments.Add("/wd4800"); // 4800: Implicit conversion from 'type' to bool. Possible information

I cannot debut a project in Code Blocks step by step

I'm trying to debut my code step by step, but I don't know why it doesn't work.
The breakpoint is set but it seems to ignore it (doesn't appear the yellow arrow).
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\CodeBlocks\ArvoresBinarias2908\
Adding source dir: C:\CodeBlocks\ArvoresBinarias2908\
Adding file: C:\CodeBlocks\ArvoresBinarias2908\bin\Debug\ArvoresBinarias2908.exe
Changing directory to: C:/CodeBlocks/ArvoresBinarias2908/.
Set variable: PATH=.;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\CodeBlocks\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn;C:\Program Files (x86)\Skype\Phone;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Interactive Intelligence\ININ Trace Initialization;C:\Program Files (x86)\Interactive Intelligence\ICUserApps;C:\Program Files\Interactive Intelligence\ICUserApps
Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args C:/CodeBlocks/ArvoresBinarias2908/bin/Debug/ArvoresBinarias2908.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 11644
[Inferior 1 (process 11644) exited normally]
Debugger finished with status 0
Can someone please help me? I've already tried somethings that I found online, but no success:
Tried with another code... no success.
Moved the project to a folder with no spaces
Checked true the "Produce debugging symbols" [-g]
Disabled the "Enable all common compiler warning..."
I really don't understand that much about Debuggers, Compilers... I just want to debug thsi code to see the variable changes and other stuff.
Thanks!
ps. This is my first question here, so sorry if I didn't follow all the rules and standards that everybody here is used to.

VisualGDB Embedded Project Error

I am using VisualGDB to build an Emedded Project using Visual StudionCommunity 2013. I chose STM32F4xxxx as my device type. I am getting the below error while doing, clean, build or rebuild
Error 6 error MSB3073: The command ""\VisualGDB.exe" /rebuild "C:\MyWork\experiments\Embedded\EmbeddedProject1\EmbeddedProject2\EmbeddedProject2.vcxproj" "/solution:C:\MyWork\experiments\Embedded\EmbeddedProject1\EmbeddedProject1.sln" "/config:Debug" "/platform:ARM"" exited with code 9009.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 43 5 EmbeddedProject2
I had the same error and my problem was that I had not the beginning of a path in my makefile (I had just ".../NameOfTheLib" and I replace by "C:/Documents/...AllMyPath/NameOfTheLib") and now it works and I can send my project by SSH.

Can't run post build with UnitTest++ VS2012

I am going through the MoneyApp tutorial for UnitTest++, but I am receiving the following error when I add the postbuild settings. I am wondering if it's because of the space before (x86), does anybody know how to resolve this?
Error 1 error MSB3073: The command "C:\Users\Admin\Documents\Visual Studio 2012\Projects\MoneyTestApp\Debug\MoneyTestApp.exe
:VCEnd" exited with code 9009. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 134 5 MoneyTestApp
My suspicions were right, it was the spaces in Visual Studio 2012 that were causing the problem, I found a solution that escapes the spaces with three double quotes. Works fine.