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"

[UPDATE] LNK1181 Error: cannot open input file 'C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\Win64\UE4-UMGEditor.lib'

[UPDATE]

So, after going through all of my files, I did find one preprocessor include directive that referenced "Blueprint.h". I removed it, but am still getting errors, although different. The project still compiles successfully with Editor build configurations.

alt text

New Error: LNK1181: cannot open input file 'C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\Win64\UE4-UMGEditor.lib'

Any advice would be appreciated.


ORIGINAL ISSUE:

alt text Error: C1083 Cannot open include file: 'WidgetBlueprint.generated.h': No such file or directory

So this is kind of a weird one for me. I've experienced similar issues like this before, but this time I have a large project relying on it, so I can't exactly rebuild the project to get around this issue. I'm hoping someone can help me with this issue.

Everything works great if I build the project with the Editor, but get this error when trying to package or build without the editor.

Build Configurations that work: Debug Game Editor, Development Editor Build Configurations that cause errors: Debug Game, Development, Shipping

My Project Build.cs file:

 // Fill out your copyright notice in the Description page of Project Settings.
 
 using UnrealBuildTool;
 
 public class Project : ModuleRules
 {
     public Project(TargetInfo Target)
     {
         PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "MySQL", "UMG", "UMGEditor", "Slate", "SlateCore" });
 
         PrivateDependencyModuleNames.AddRange(new string[] {  });
 
         // Uncomment if you are using Slate UI
          PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
         
         // Uncomment if you are using online features
          PrivateDependencyModuleNames.Add("OnlineSubsystem");
 
         // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
     }
 }
 

I believe I have all the necessary modules needed to use UMG. I have created an extended UserWidget C++ class that doesn't inherit from WidgetBlueprint.h, but rather from UserWidget.h as should.

Extended Widget Blueprint class that I build:

 // Fill out your copyright notice in the Description page of Project Settings.
 
 #pragma once
 
 #include "Blueprint/UserWidget.h"
 #include "MySQLEngine.h"
 #include "Project_WindowsOS.h"
 #include "Project_ExtendedWidgetBlueprint.generated.h"
 
 /**
  * 
  */
 
 UENUM(BlueprintType)
 enum class EPaginationArrowDirection : uint8
 {
     NONE UMETA(DisplayName="None"),
     ARROW_LEFT UMETA(DisplayName="Left Arrow"),
     ARROW_RIGHT UMETA(DisplayName="Right Arrow")
 };
 
 UCLASS()
 class PROJECTDEV_API UProject_ExtendedWidgetBlueprint : public UUserWidget
 {
     GENERATED_BODY()
     
     MySQLEngine sqlInterface;
 
 public:
     UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Custom)
         FString MachineName;
 
     UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Custom)
         FString StationName;
 
     UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Custom)
         TArray<FString> AllListedMachines;
 
     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Custom|Pagination")
         EPaginationArrowDirection PaginationArrowDirection;
         
     UFUNCTION(BlueprintCallable, Category = Custom)
         FString GetMachineName();
 
     UFUNCTION(BlueprintCallable, Category = Custom)
         TArray<FString> GetAllSimulatorMachines();
 
     UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Custom|Pagination")
         void DeactivateAllPaginations();
 };

Maybe I'm just missing something, but it doesn't make sense to me why my project compiles for Editor builds, but won't package or work with any other builds. Any help would be most grateful. Thank you in advanced!

Product Version: UE 4.15
Tags:
vserror1.png (18.5 kB)
vserror1.png (2.9 kB)
more ▼

asked Jul 11 '17 at 06:28 AM in Packaging & Deployment

avatar image

ENiari Games
66 4 8 12

avatar image ENiari Games Jul 11 '17 at 07:14 AM

If you guys need any extra information or project files, let me know and I'll have them uploaded.

I am a little limited on what I can send for this project due to an NDA I had to sign.

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

2 answers: sort voted first

[SOLVED]

Alright, so for anyone having any of the aforementioned issues, I finally figured out what was causing the problems.

I would also like to credit this posting for helping me weed out the issues: https://answers.unrealengine.com/questions/3533/bug-lnk1181-cannot-open-input-file.html

If you are experiencing Error: C1083 Cannot open include file: 'WidgetBlueprint.generated.h': No such file or directory, then somewhere in your c++ code, you have tried including "BlueprintWidget.h". It took me a few hours, but I finally figured out my mistake. If you say you haven't used it, look again just to be sure, because I was on that bandwagon as well and ended up finding where I used it. Mistakes happen, especially when doing large projects, so don't feel bad if 90% of your UserWidget extensions correctly use "Blueprints/UserWidget.h" and you accidentally include "Blueprint.h" on one of your header files.

If you are experiencing LNK1181: cannot open input file 'C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\Win64\UE4-UMGEditor.lib' on Development, Shipping, or DebugGame builds, then make sure that in your "Project.Build.cs" file, you have either removed "UMGEditor" or added an if statement to dynamically add UMGEditor on Editor builds only.

Here is an example of the correct project.Build.cs solution:

  using UnrealBuildTool;
     
     public class MyProject : ModuleRules
     {
         public MyProject(TargetInfo Target)
         {
             PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "MySQL", "UMG", "Slate", "SlateCore" });
 
 // ONLY ADD UMGEditor IF UEBuildConfiguration.bBuildEditor IS TRUE. OTHERWISE, DON'T INCLUDE DEPENDENCY MODULE ON NON-EDITOR BUILDS.
             if(UEBuildConfiguration.bBuildEditor)
             {
                 PublicDependencyModuleNames.AddRange(new string[] { "UMGEditor" });
             }
     
             PrivateDependencyModuleNames.AddRange(new string[] {  });
     
             // Uncomment if you are using Slate UI
              PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
             
             // Uncomment if you are using online features
              PrivateDependencyModuleNames.Add("OnlineSubsystem");
     
             // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
         }
     }

With the main focus being here:

  if(UEBuildConfiguration.bBuildEditor)
     {
         PublicDependencyModuleNames.AddRange(new string[] { "UMGEditor" });
     }

more ▼

answered Jul 11 '17 at 07:31 PM

avatar image

ENiari Games
66 4 8 12

avatar image liu0fanyi Oct 04 '17 at 07:29 AM

I get the same problem, And I hit WidgetBlueprint.generated.h': No such file or directory... But I need WidgetBlueprint.h to do this:

         static ConstructorHelpers::FObjectFinder<UWidgetBlueprint> InventoryWidgetBPContainter(TEXT("WidgetBlueprint'/Game/Widgets/BP_InventoryWidget.BP_InventoryWidget'"));

How could I solve this question without delete it?

avatar image JokerDoky Oct 29 '17 at 06:00 PM

i have the same "LNK1181: cannot open input file 'C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\Win64\UE4-UMGEditor.lib'" error. I don't have UMGEditor Dependency on my Project.Build.cs file(also tried adding one in if statement). Still gets the same error when packaging the game. What should i do?

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

Have you tried removing "UMGEditor" from your list of modules?

I'm able to create custom UserWidgets just fine, and I'm not including that module. Your widget and Build.cs look similar to mine otherwise.

more ▼

answered Jul 11 '17 at 07:15 PM

avatar image

Archduke_
159 2 4 9

avatar image ENiari Games Jul 11 '17 at 07:36 PM

Yeah, that ended up being the issue. Thank you for your response! Just hoping this will help someone who runs into this same scenario in the future.

avatar image Archduke_ Jul 11 '17 at 09:22 PM

Glad that fixed it, and thanks for typing up a detailed google-able response! It helps out everyone. :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question