x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[Closed] VC++ directories not set on start - causing 2 errors

Hi,

when I get engine source, or when I start a new C++ project, in VS Properties / Configuration Properties / VC++ Directories are blank, only Executable Directories is fine, all the other ones require to select manually "inherit from parent..." and press Apply.

Compilation works afterwards, but it causes an error message on C++ project start, and probably it is related to not working hot reload. I use 4.7.2. and VS2013 Community, project path contain no special characters, PATH is set properly. (But I'm using a non-English Win7, and my user name contains an 'á')

C++ project start problem is described here, which is solved by the process described above (message: The project failed to compile with this version of the engine. Would you like to open the project in Visual Studio?), but when new class is added, it is always needed to set them again and again...

The Hot Reload problem is mentioned here, it is impossible for me currently, after a long compilation it always ends with a message: Error LINK : fatal error LNK1181: cannot open input file 'delayimp.lib'.

Is there any solution for it? Thanks.

Ivan

Product Version: Not Selected
Tags:
more ▼

asked Mar 17 '15 at 09:21 AM in Bug Reports

avatar image

sivan
76 6 8 14

avatar image Steve Robb STAFF Mar 17 '15 at 02:47 PM

Hey sivan,

Could you also please report which of these registry keys you have, and what the associated InstallDir is:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\WDExpress\12.0 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WDExpress\12.0

And also the InstallationFolder from these keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1

And finally all of the above but under HKEY_CURRENT_USER instead.

This is where we look for Visual C++ installations, and Visual C++ is responsible for setting up the SDK paths. I give the same advice here: https://answers.unrealengine.com/questions/183441/cant-load-c-projects.html

... as it sounds like a related problem, but I haven't had a response there yet.

Steve

avatar image sivan Mar 18 '15 at 11:19 AM

Hi,

I had the same missing mspdb120.dll problem before swithced to VS2013Comm, probably caused by VS2010Pro or WinSDK-s I uninstalled before installing VS2013Comm.


HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0 :

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\

HKEY_CURRENT_USER...

this registry path does not exist


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0

found no installdir here, only some scrpath under Setup...

HKEY_CURRENT_USER...

no installdir here, only in 12.0_Config:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\

similar registry folders/keys exist here for 10.0 and 10.0_Config


HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\WDExpress\12.0

no installdir regkey here

HKEY_CURRENT_USER...

this registry path does not exist


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WDExpress\12.0

this registry path does not exist

HKEY_CURRENT_USER...

no installdir here, only in 12.0_Config:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\


HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1

C:\Program Files (x86)\Windows Kits\8.1\

but I have several other winsdk-s here under Windows, all with InstallationFolder, except v7.1: v7.1, v7.1A, v8.0, v8.0A, v8.1, v8.1A (I uninstalled VS2010, VS2013EE, and earlier winsdks when installed VS2013 community)

HKEY_CURRENT_USER...

this registry path does not exist


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\

here I have also v7.1, v7.1A, v8.0A, v8.1A but v7.1 and v8.0A without installation folder key

HKEY_CURRENT_USER...

this registry path does not exist

avatar image Steve Robb STAFF Mar 18 '15 at 05:21 PM

Hi again sivan,

This looks ok to me. The problem as I see it is that UBT is not picking up the Visual Studio environment variables for some reason. Could you open a command window, go to:

 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64

... and then run:

 vcvarsx86_amd64.bat

... followed by:

 set | clip

... and then paste the result here?

I'm trying to establish if there is something in your environment variables that UBT is failing to process for some reason. The LIB variable should include an entry for a path like:

 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64

... which is where the delayinp.lib file lives.

Steve

avatar image sivan Mar 19 '15 at 09:33 AM

hi,

I get nothing when running it from a command prompt (I used Developer Command Prompt for VS2013). if I run it from Total Commander, only a blank command-prompt-like window appears for a second.

where should I get the LIB variable? it is not among the Environmental Variables, like PATH.

Ivan

avatar image Steve Robb STAFF Mar 19 '15 at 11:01 AM

Sorry, I should have made it clear that 'set | clip' will put the output of the set command into the clipboard for you, instead of the console window. You should literally be able to paste the output directly, without copying. Remove the '| clip' if you want to see the output for yourself.

The LIB variable (and others) should be set by vcvarsx86_amd64.bat.

Steve

avatar image sivan Mar 20 '15 at 10:49 AM

hi Steve, sorry no success, my clipboard is not changed by it. Regards,

Ivan

avatar image Steve Robb STAFF Mar 20 '15 at 10:50 AM

Well, that's interesting. Even running 'set' on its own in a command line produces nothing?

Steve

avatar image sivan Mar 20 '15 at 11:55 AM

exactly. I also tried by making a .bat (but similar result), containing:

call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat" set

avatar image Steve Robb STAFF Mar 20 '15 at 05:18 PM

Could you try copying the following into a new file called info.bat and running it, please? It should dump some information about your setup into a file called info.txt. After that, please attach the file here.

Thanks!

Steve

 @echo off
 set LOGFILE=%CD%\info.txt
 set VS120COMNTOOLS >%LOGFILE%
 
 echo. >>%LOGFILE%
 echo ****** 32-bit toolchain: ****** >>%LOGFILE%
 echo. >>%LOGFILE%
 
 pushd %VS120COMNTOOLS% >>%LOGFILE%
 setlocal
 dir >>%LOGFILE%
 call vsvars32.bat >>%LOGFILE%
 echo. >>%LOGFILE%
 echo PATH=%PATH% >>%LOGFILE%
 echo. >>%LOGFILE%
 echo INCLUDE=%INCLUDE% >>%LOGFILE%
 echo. >>%LOGFILE%
 echo LIB=%LIB% >>%LOGFILE% 
 endlocal
 popd
 
 echo. >>%LOGFILE%
 echo ****** x86-amd64 toolchain: ****** >>%LOGFILE%
 echo. >>%LOGFILE%
 
 pushd %VS120COMNTOOLS%..\..\VC\bin\x86_amd64 >>%LOGFILE%
 setlocal
 dir >>%LOGFILE%
 call vcvarsx86_amd64.bat >>%LOGFILE%
 echo. >>%LOGFILE%
 echo PATH=%PATH% >>%LOGFILE%
 echo. >>%LOGFILE%
 echo INCLUDE=%INCLUDE% >>%LOGFILE%
 echo. >>%LOGFILE%
 echo LIB=%LIB% >>%LOGFILE% 
 endlocal
 popd
avatar image sivan Mar 23 '15 at 01:55 PM

Hi, done, the file is here (my Windows is Hungarian)

info.txt (8.8 kB)
avatar image Steve Robb STAFF Mar 23 '15 at 04:31 PM

Have you replaced cmd.exe with PowerShell, or any other shell replacement?

Steve

avatar image sivan Mar 24 '15 at 08:13 AM

no, I don't even know how to do that :) maybe an installed software could do it?

avatar image Steve Robb STAFF Mar 24 '15 at 11:23 AM

I've made a change to how the environment variables are harvested which doesn't rely on 'set'. You say you are running the engine from source, so you should be able to get the following three changes:

https://github.com/EpicGames/UnrealEngine/commit/a80f7b84c443b4a0db748fbd56ca84369d1d940d

https://github.com/EpicGames/UnrealEngine/commit/d44fd8bfe30edbfdcdd0d421db7d862b749ccc8d

https://github.com/EpicGames/UnrealEngine/commit/6f79ebe1e1a87ebcfaabbdefe3599ffabfe5f04f

Build the new EnvVarsToXML.exe from the specified project, and then rebuild UnrealBuildTool with the changes made to Utils.cs. Then please report back whether or not this fixes your problem.

Steve

avatar image sivan Mar 26 '15 at 08:21 AM

I need a little more time, as yesterday I had problems. First downloaded a clean 4.7.3, made EnvVarsToXML.exe, changed Utils.cs but then UE4.sln was not possible to generate, then got the original Utils.cs from GitHub, but UE4 compilation failed. Today I make a new trial with a clean engine compiled first, then applying everything else afterwards.

avatar image Steve Robb STAFF Mar 26 '15 at 03:09 PM

Please also get this latest change which should fix EnvVarsToXML.exe compilation for GitHub users:

https://github.com/EpicGames/UnrealEngine/commit/0aea4571125f61da51ef9770a79a18ce691c2c86

Steve

avatar image sivan Mar 27 '15 at 08:22 AM

hi,

I made the changes, built EnvVarsToXML.exe again, but building UnrealBuildTool fails with:

Error 1 The namespace 'UnrealBuildTool' already contains a definition for 'MasterProjectFolder' C:\UE4\UE473mod\Engine\Source\Programs\UnrealBuildTool\System\VCProjectFileGenerator.cs 17 Error 2 The namespace 'UnrealBuildTool' already contains a definition for 'ProjectFileGenerator' C:\UE4\UE473mod\Engine\Source\Programs\UnrealBuildTool\System\VCProjectFileGenerator.cs 104 Error 3 The namespace 'UnrealBuildTool' already contains a definition for 'ProjectFileComparer' C:\UE4\UE473mod\Engine\Source\Programs\UnrealBuildTool\System\VCProjectFileGenerator.cs 2261 Warning 4 The referenced component 'EnvVarsToXML' could not be found.

or should I rebuild the whole engine again?

avatar image Steve Robb STAFF Mar 27 '15 at 08:35 AM

That sounds like a bad sync to me, like you've got two copies of VCProjectFileGenerator.cs or something. The missing EnvVarsToXML seems odd too, like it's a different instance of UnrealBuildTool, or one of the two .vsproj files are not where they are supposed to be.

Please recheck your changes and project layout.

Steve

avatar image sivan Mar 27 '15 at 09:42 AM

hmm.. I copied back my backupő files corresponding to UnrealBuildTool, compiled fine, made the changes again (from scratch), now I get this error:

Error 1 'UnrealBuildTool.MSBuildProjectFile' does not contain a definition for 'ShouldBuildByDefaultForSolutionTargets' and no extension method 'ShouldBuildByDefaultForSolutionTargets' accepting a first argument of type 'UnrealBuildTool.MSBuildProjectFile' could be found (are you missing a using directive or an assembly reference?) C:\UE4\UE473mod\Engine\Source\Programs\UnrealBuildTool\System\VCProjectFileGenerator.cs 660 Error 2 'UnrealBuildTool.VCSharpProjectFile' does not contain a definition for 'ShouldBuildByDefaultForSolutionTargets' and no extension method 'ShouldBuildByDefaultForSolutionTargets' accepting a first argument of type 'UnrealBuildTool.VCSharpProjectFile' could be found (are you missing a using directive or an assembly reference?) C:\UE4\UE473mod\Engine\Source\Programs\UnrealBuildTool\System\ProjectFileGenerator.cs 1201 Warning 3 The referenced component 'EnvVarsToXML' could not be found.

avatar image Steve Robb STAFF Mar 27 '15 at 12:45 PM

Did you apply those changes as patches or just download the entire latest .cs file? I think you have a mix of old and new changes... none of the patches I listed above refer to ShouldBuildByDefaultForSolutionTargets.

Try applying the patches individually, or getting the entire of the latest UnrealBuildTool source.

Steve

avatar image sivan Mar 27 '15 at 02:40 PM

1st copied stuff from 1st 3 links to new files and updated utils.cs line by line, but the 3rd one seemed to me containing all the previous 2 ones, so when the 4th link appeared, I copied from github view/raw the whole files... okay, back to backups again...

avatar image sivan Mar 30 '15 at 09:30 AM

hi,

if I get UBT from master-branch, I get this: Warning 1 The project 'EnvVarsToXML' cannot be referenced. but UBT compilation succeeds. but get the attached error message on creating a new basic code project.

maybe I do something stupid, but probably a step-by-step list would help us... (to exactly know what to and what not to do) I'm not professional in VS and C++ at all, mainly used a C-like script language so far...

error.txt (3.1 kB)
avatar image Steve Robb STAFF Mar 30 '15 at 09:41 AM

Something has changed in the build process meaning that those functions

It's hard for me to suggest a series of steps since I'm not part of the GitHub source distribution process and I can't say what will be needed, nor do I know what the state your engine source code is.

However, I no longer suggest the patch method. Instead, I suggest that you get all latest code from GitHub, rather than just the UBT source. That way, all the source should be in sync and you shouldn't have some tools in one state and other tools in another state. Then try building UBT and running as usual.

Let me know how it goes.

Steve

avatar image sivan Apr 01 '15 at 03:04 PM

The master branch compilation failed yesterday, I will try it again after my holiday. By the way, 4.7 engine compilation takes double time than 4.4 did here, and it decreases my motivation to do it too often. Maybe it is related to my pc (nothing changed), or switching from VS2013EE to Community (but in general it seems to be faster).

Until it is resolved perfectly, it would be really practical to put a compile checkbox in add-new-class wizard window, because it also fails with an error message, and class addition seems to be failing (over the name a message bar appears saying a class with similar name already exists), but after closing the messagebox, the wizards, and the editor, and updating project in VS, the new classes are there.

avatar image sivan Apr 02 '15 at 09:00 AM

the promoted branch fails to generate project files too.

avatar image Steve Robb STAFF Apr 02 '15 at 09:39 AM

Fails how? As we do not see the problems you see, we need explicit details on what exactly you see every time.

The engine goes through an extensive testing cycle before promotion and would not have been promoted if we could repeat your issue internally.

Steve

avatar image sivan Apr 02 '15 at 12:43 PM

today morning downloaded promoted branch and ran setup.bat, then ran GenerateProjectFiles.bat, and: alt text (I think I got similar error after made changes discussed above) I really hope it can be resolved as it would mean I cannot use the engine source...

avatar image sivan Apr 02 '15 at 12:45 PM

(right click to show picture in larger size)

avatar image Steve Robb STAFF Apr 02 '15 at 01:43 PM

Can you repost that output but scrolled up to show the top part of the error, please?

avatar image sivan Apr 02 '15 at 03:11 PM

ahh sorry, here is the full one: alt text

avatar image Steve Robb STAFF Apr 02 '15 at 03:30 PM

Ok, this appears that the XML file is empty. This is likely to be because the EnvVarsToXML.exe file either doesn't exist or failed to execute for some reason.

Have you definitely got a built and working EnvVarsToXML.exe in your Engine/Binaries/DotNET folder? Can you run it from a command line and check that it produces output, e.g.:

EnvVarsToXML env.xml

Next, open up your %TEMP% folder and sort by date. The latest files should include a tmp1234.tmp.bat (but with some other random number) file and another with the same name without the .bat extension. I'm guessing that the .tmp file is missing or empty (please confirm), and that the .tmp.bat has not run correctly for some reason.

Please post the .tmp.bat file here for analysis.

Steve

avatar image sivan Apr 02 '15 at 03:51 PM

EnvVarsToXML.exe exists in the DotNET folder, but produces no xml file

yes, tmp8263.tmp is empty, maybe because the .bat file contains special characters (due to my user name):

call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools../../VC/bin/x86_amd64/vcvarsx86_amd64.bat" "C:\UE4\UE473p\Engine\Binaries\DotNET\EnvVarsToXML.exe" "C:\Users\Iván\AppData\Local\Temp\tmp8263.tmp"

avatar image Steve Robb STAFF Apr 02 '15 at 04:10 PM

If you run the .bat file directly, does it still fail to produce a non-empty file?

If you replace the batch file with the following (making sure it's written out as an ASCII file), does it work?

call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools../../VC/bin/x86_amd64/vcvarsx86_amd64.bat" "C:\UE4\UE473p\Engine\Binaries\DotNET\EnvVarsToXML.exe" "%TEMP%\tmp8263.tmp"

avatar image sivan Apr 02 '15 at 05:00 PM

if I run the tnp...bat by clicking on it, it stops with an unhandled exception alt text

with the modified content not even an empty tmp file produced.

avatar image sivan Apr 02 '15 at 05:15 PM

I copied it to another location and modified the content as the following but no output tmp file:

call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools../../VC/bin/x86_amd64/vcvarsx86_amd64.bat" "C:\UE4\UE473p\Engine\Binaries\DotNET\EnvVarsToXML.exe" "C:\UE4\000\tmp8263.tmp"

Blockquote

avatar image Steve Robb STAFF Apr 02 '15 at 05:25 PM

You can see from your screenshot that the path has been corrupted by the batch file. Your username and also the 'call' program has not been run correctly because of non-ASCII characters on the prefix.

This is because the batch file has been written out as Unicode due to the presence of non-ASCII characters. When you modify the content, you need to ensure that the encoding type is ANSI, not Unicode. If you are using Notepad, you have that option on the Save As dialog, as seen here:

link

I have another solution to avoiding this problem which I'm currently testing.

Steve

ansi.png (13.1 kB)
avatar image sivan Apr 03 '15 at 05:54 AM

the screenshot was made after running the unmodified bat file.

avatar image sivan Apr 03 '15 at 05:57 AM

okay, made it again checking the modified bat file to be ansi, and it works, see attached: link text

tmpa435.tmp.txt (17.3 kB)
avatar image trutty Mar 27 '15 at 12:35 PM

Hi Steve Robb,

I applied are your stated changes as well and built the EnvVarsToXML successfully. However, when rebuilding UBT I get the errors:

 2>------ Rebuild All started: Project: UnrealBuildTool, Configuration: Development Any CPU ------
 2>D:\UE4\Engine\Source\Programs\UnrealBuildTool\System\ProjectFileGenerator.cs(1201,25,1201,63): error CS1061: 'UnrealBuildTool.VCSharpProjectFile' does not contain a definition for 'ShouldBuildByDefaultForSolutionTargets' and no extension method 'ShouldBuildByDefaultForSolutionTargets' accepting a first argument of type 'UnrealBuildTool.VCSharpProjectFile' could be found (are you missing a using directive or an assembly reference?)
 2>D:\UE4\Engine\Source\Programs\UnrealBuildTool\System\VCProjectFileGenerator.cs(660,89,660,127): error CS1061: 'UnrealBuildTool.MSBuildProjectFile' does not contain a definition for 'ShouldBuildByDefaultForSolutionTargets' and no extension method 'ShouldBuildByDefaultForSolutionTargets' accepting a first argument of type 'UnrealBuildTool.MSBuildProjectFile' could be found (are you missing a using directive or an assembly reference?)
 ========== Rebuild All: 0 succeeded, 1 failed, 1 skipped ==========
avatar image Steve Robb STAFF Mar 27 '15 at 12:46 PM

Hi trutty,

I think you have the same problem with old and new code as sivan above... please follow up with more info there.

Steve

avatar image trutty Mar 27 '15 at 02:30 PM

Alright, one step closer. Copying the entire UnrealBuildTool folder from the master branch, I now can compile UBT without errors. When trying to launch (or Clean) the Editor I get the following errors

errors.txt (3.0 kB)
avatar image Steve Robb STAFF Mar 27 '15 at 02:37 PM

These are more of the same type of problem. I think you may have to sync all of the tool source in order to continue, or just roll back your source to the last working version and apply the patches above individually.

Steve

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Apr 07 '15 at 01:58 PM by Steve Robb for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

Ok, I'm hopeful that my latest change will fix things then.

https://github.com/EpicGames/UnrealEngine/commit/67f144d32918455cd583a459a0a5fee28d00f499

I believe you should be able to copy the latest version of this file (Utils.cs) from the Master branch over your Promoted branch and it should work.

Let me know how it goes.

Steve

more ▼

answered Apr 03 '15 at 09:31 AM

avatar image

Steve Robb STAFF
2.8k 58 28 101

avatar image sivan Apr 03 '15 at 01:01 PM

good news, GenerateProjectFiles works fine now, thanks! now I try to compile the promoted branch and tell you whether hot reload works or not. it must work :)

avatar image sivan Apr 03 '15 at 01:06 PM

for the 1st sight after opening the sln, in VS Properties / Configuration Properties / VC++ Directories are still blank, only Executable Directories is fine, i.e. the same as it was before...

avatar image sivan Apr 03 '15 at 04:11 PM

...and hot reload..............................................................works now !!! thank you for the effort!

avatar image Steve Robb STAFF Apr 07 '15 at 11:24 AM

No problem. I've changed my last post to an answer... please vote on it to accept it, to help direct others to it. :-)

Steve

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question