Build error with new UE5.1 project in Rider - c++

I am just getting started with C++ in UE5.1. I am using Rider 2022.3.1
Upon trying to build the project in Rider, I get the following error:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "D:\UE_5.1\Engine\Build\BatchFiles\Build.bat R2NAlaskaEditor Win64 Development -Project="C:\Users\..........R2NAlaska.uproject" -WaitMutex -FromMsBuild" exited with code 6. [C:\Users.....\R2NAlaska\Intermediate\ProjectFiles\R2NAlaska.vcxproj]
I've tried nuking the intermediate and VS folders and rebuilding the solution with no effect.
Here is the full build log:
Build started 1/28/2023 9:09:02 AM.
Logging verbosity is set to: Normal.Project "C:\Users\javor\Desktop\R2NAlaska\R2NAlaska.sln" on node 1 (Games\R2NAlaska target(s)).
ValidateSolutionConfiguration:
Building solution configuration "Development Editor|Win64".
ValidateProjects:
The project "UE5" is not selected for building in solution configuration "Development Editor|Win64".
Project "C:\Users\javor\Desktop\R2NAlaska\R2NAlaska.sln" (1) is building "C:\Users\javor\Desktop\R2NAlaska\Intermediate\ProjectFiles\R2NAlaska.vcxproj" (2) on node 1 (default targets).
Build:
D:\UE_5.1\Engine\Build\BatchFiles\Build.bat R2NAlaskaEditor Win64 Development -Project="C:\Users\javor\Desktop\R2NAlaska\R2NAlaska.uproject" -WaitMutex -FromMsBuild
Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" R2NAlaskaEditor Win64 Development -Project="C:\Users\javor\Desktop\R2NAlaska\R2NAlaska.uproject" -WaitMutex -FromMsBuild
Log file: C:\Users\javor\AppData\Local\UnrealBuildTool\Log.txt
Unable to build while Live Coding is active. Exit the editor and game, or press Ctrl+Alt+F11 if iterating on code in the editor or game
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "D:\UE_5.1\Engine\Build\BatchFiles\Build.bat R2NAlaskaEditor Win64 Development -Project="C:\Users\javor\Desktop\R2NAlaska\R2NAlaska.uproject" -WaitMutex -FromMsBuild" exited with code 6. [C:\Users\javor\Desktop\R2NAlaska\Intermediate\ProjectFiles\R2NAlaska.vcxproj]
Done Building Project "C:\Users\javor\Desktop\R2NAlaska\Intermediate\ProjectFiles\R2NAlaska.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\Users\javor\Desktop\R2NAlaska\R2NAlaska.sln" (Games\R2NAlaska target(s)) -- FAILED.
Build FAILED.
"C:\Users\javor\Desktop\R2NAlaska\R2NAlaska.sln" (Games\R2NAlaska target) (1) ->
"C:\Users\javor\Desktop\R2NAlaska\Intermediate\ProjectFiles\R2NAlaska.vcxproj" (default target) (2) ->
(Build target) ->
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "D:\UE_5.1\Engine\Build\BatchFiles\Build.bat R2NAlaskaEditor Win64 Development -Project="C:\Users\javor\Desktop\R2NAlaska\R2NAlaska.uproject" -WaitMutex -FromMsBuild" exited with code 6. [C:\Users\javor\Desktop\R2NAlaska\Intermediate\ProjectFiles\R2NAlaska.vcxproj]
0 Warning(s)
1 Error(s)
Note that is warns about Live Coding and exiting the engine, but the engine was not running during these builds.

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.

Building vcxproj file gives me a informationless error "The system cannot find the path specified"

When I build a project in vs 2017, I can get errors like this:
1>------ Build started: Project: TortoiseGitMerge, Configuration: Debug Win32 ------
1>Performing Custom Build Tools
1>The system cannot find the path specified.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 3.
1>Done building project "TortoiseMerge.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 10 up-to-date, 0 skipped ==========
In this error message, there is no information leading me closer to a solution.
Which path was specified?
How do I find out? What is the exact reason that the path in question was not written in that error message?
Performing Custom Build Tools
That isn't enough to know what is going on. You'll want to jack up the build verbosity so you can see these custom build commands getting executed. Finding the one that failed then gives you a shot at diagnosing the mishap.
Use Tools > Options > Projects and Solutions > Build and Run, "MSBuild project build output verbosity" = Detailed. The build trace you now see in the Output window gets a lot more chatty and should show the actual command that fell over.

Permission error every time I build in visual studio 2015

I have just started learning to program using Unreal and I am following a tutorial for Unreal Engine on Udemy and recently I've been running into a problem where every time I write code wrong and I build the project , even though there are no lines indicating errors , I get this message
>
1>------ Build started: Project: BuildingEscape, Configuration: Development_Editor x64 ------
1> Compiling game modules for hot reload
1> Performing 2 actions (2 in parallel)
1> [2/2] Link UE4Editor-BuildingEscape-2523.lib
1> [1/2] Link UE4Editor-BuildingEscape-7173.dll
1> Creating library D:\Unreal Projects\03_BuildingEscape\BuildingEscape\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BuildingEscape-7173.lib and object D:\Unreal Projects\03_BuildingEscape\BuildingEscape\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BuildingEscape-7173.exp
1> Creating library D:\Unreal Projects\03_BuildingEscape\BuildingEscape\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BuildingEscape-7173.suppressed.lib and object D:\Unreal Projects\03_BuildingEscape\BuildingEscape\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BuildingEscape-7173.suppressed.exp
1>ERROR : UBT error : Failed to produce item: D:\Unreal Projects\03_BuildingEscape\BuildingEscape\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BuildingEscape-2523.lib
1> Total build time: 3.07 seconds (Local executor: 0.00 seconds)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""D:\Unreal Engine\Engine\UE_4.15\Engine\Build\BatchFiles\Build.bat" BuildingEscapeEditor Win64 Development "D:\Unreal Projects\03_BuildingEscape\BuildingEscape\BuildingEscape.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
and even though I delete the code that I wrote and hit build again I get the same error...
I am using windows 10.
Before you go too far down the rabbit hole, check to be sure your operating system doesn't simply have a lock on one of your intermediate files. If you delete the entire contents of D:\Unreal Projects\03_BuildingEscape\BuildingEscape\Intermediate\ before rebuilding, that will ensure that you're not simply looking at a locked or corrupt intermediate. This isn't guaranteed to be the issue, but bad intermediates can cause otherwise inexplicable build errors, so clearing them can at least narrow down the range of possible causes you'll need to investigate. Of course make sure your editor isn't running, or running as a stuck process, while you're trying to rebuild.
I don't know what is causing the issue with compiling from visual studio , but if I compile using the Compile button in Unreal the code seems to be compiling just fine.

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.

Running QWT example program(.pro) with Visual Studio 2010 error

I face the following error when trying to run a qwt example, the oscilloscope example to be exact in Visual Studio QT add in. There will be build errors, and the following lines will be shown:
1>------ Build started: Project: oscilloscope, Configuration: Debug Win32 ------
1>Build started 3/1/2014 4:57:18 PM.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(298,5): warning MSB8004: Intermediate Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
1>InitializeBuildStatus:
1> Touching "Win32\Debug\oscilloscope.unsuccessfulbuild".
1>CustomBuild:
1> Moc'ing knob.h...
1> The syntax of the command is incorrect.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 255.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.05
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Do anybody have any idea why? Not sure if this problem is related, but when I open qt project from Visual Studio, the output from the "Qt Visual Studio Add in" shows:
--- (Import): Generating new project of oscilloscope.pro file
--- (qmake) : Using: c:\qt\qt5.1.1\5.1.1\msvc2010\bin\qmake
--- (qmake) : Working Directory: C:\qwt-6.1.0\examples\oscilloscope
--- (qmake) : Arguments: -tp vc "oscilloscope.pro" -o "oscilloscope.vcxproj" QMAKE_INCDIR_QT=$(QTDIR)\include QMAKE_LIBDIR=$(QTDIR)\lib QMAKE_MOC=$(QTDIR)\bin\moc.exe QMAKE_QMAKE=$(QTDIR)\bin\qmake.exe
--- (qmake) : Exit Code: 0
Could not parse QTDIR from project file oscilloscope.vcxproj.
--- (Import): Added oscilloscope.vcxproj to Solution
=== Update uic steps ===
=== 0 uic steps updated. ===
=== Update rcc steps ===
=== 0 rcc steps updated. ===
Could the "could not parse QTDIR from project file oscilloscope.vcxproj" be the cause of this problem?
All the examples are able to run in qt creator itself. This problem only occurs when I try to run in from Visual Studio.
I have already ran through the proper installation guide found on the qwt website for both qt creator and MSVC. Any idea why this problem occurs? Please help. Any advice or suggestion will be greatly appreciated.
There was a bug in the Visual Studio add-in when using subdirs. Try to change this in the qwt.pro file before importing:
SUBDIRS = \
src \
textengines
to:
SUBDIRS = src textengines
Then, do the import again. You could also use a fixed version of the Visual Studio add-in.
Here you can find the corresponding issue on the Qt bug tracker:
Qt Visual Studio Add-in 1.1.0 doesn't parse QTDIR correctly in a project with SUBDIRs
I solved this error by deleting this line into the qwtbuild.pri file:
CONFIG += silent
Now all the examples of qwt library are working well!
Try to delete the %40echo moc .* && in qwt.vcxproj qwt_designer_plugin.vcxproj.
After that, you should reload the projects.
I am using VS2013 Qwt6.1.2 Qt5.6.0.
I have the exact same problem using Visual Studio 2012, VS addin1.2.2, Qt 5.2, Qwt 6.1, when trying to compile the bode example. None of the above hints seem to help, in particular I don't see any multiline SUBDIRS in the .pro file.