Announcement

Collapse
No announcement yet.

Cannot build plugin module - LINK : fatal error LNK1181: cannot open input file '..\UE4Editor.lib'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cannot build plugin module - LINK : fatal error LNK1181: cannot open input file '..\UE4Editor.lib'

    For whatever reason no matter what I do, since yesterday all of a sudden I can't build my plugin module anymore. If I remove it (the whole Plugins folder) from my project it builds just fine, but if I try to build the plugin it fails due to

    LINK : fatal error LNK1181: cannot open input file 'C:\Program Files (x86)\Epic Games\4.13\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor.lib'

    But there is no other error or warning.

    Well, there's about 300 UE4Editor-****.lib files in that folder, but nothing without a suffix name for an engine component. Does anyone have the slightest clue as to why it won't build? Is there a more verbose log output from UE Build tools or Visual Studio somewhere that can help me track this down? I don't know what to do. This is completely stopping me from working on the plugin any further.

    #2
    I have tried:

    - Deleting Binary, Intemediate, and Build folders of both the plugin and game project
    - Cleaning the Visual Studio solution and doing a full rebuild.
    - "Type": "Developer" and "Type": "Runtime" for .uplugin module property
    - Stripping out all non-essential code
    - Deleting VS .sln and recreating it from .uproject in file explorer
    - Building in 4.12, 4.13, and 4.14 (all fail with the same error)


    Nothing works at all. Nothing.

    Comment


      #3
      UBT occasionally screws up and deletes a file it shouldn't during clean/rebuild. I've had that error a bunch of times before.
      You just need to get the file back, which if you're using a launcher build is easy, just run the Verify option on the engine installation from the launcher. If you're on source engine build, you'll probably need to build part of the engine again to generate the lib.

      Comment


        #4
        I thought that may be the case and I tried Verify, didn't work. 4.14 that just came out today and after I installed, that UE4Editor.lib does not exist in 4.14 or anywhere on my harddrive at all.
        Last edited by _Auron_; 11-16-2016, 12:45 PM.

        Comment


          #5
          From 4.13, which I'm primarily working with:

          Click image for larger version

Name:	5wFBVzW.png
Views:	1
Size:	207.1 KB
ID:	1118415
          Click image for larger version

Name:	A67POnc.png
Views:	1
Size:	129.8 KB
ID:	1118416

          Comment


            #6
            Hmm, yeah that's weird. Looks like that lib file exists within all my source-built engines, but not any launcher installations. Why your launcher build is looking for it then I can't say, sorry.

            Comment


              #7
              Hello _Auron_,

              I can confirm that I do not have that file either in my binary build, which makes me think that the error is misleading and isn't pointing to the actual issue.

              If you would like to see if it is the cause of the issue, I would suggest downloading the 4.13 source from Github and seeing if it'll compile for you on that build. Even if it doesn't, it's possible that it will give another error that this one may be hiding.

              You mentioned that this happened all of a sudden. Had you made any changes to the plugin or the project's source and/or structure between when this last worked and when it started having problems? Also, could you try moving the plugin's source to a new project to see if you get any different results?

              Comment


                #8
                Hi Matthew,

                I got the UE source to build from Github, then set UE version to the Source copy for my plugin's project, and was able to build the plugin solution without an error in VS2015 (using the Development Editor / Win64 / <ProjectName> as target). However, when I attempt to open the project, it complains that the UE4Editor-PluginModule.dll is from a different version or outdated, and wants to rebuild it. If I do, it fails, but if course if I don't it won't open.


                If I drop the \Plugins\ folder into an entirely new blank project with a blank C++ class (as the visual studio project files won't generate without anything in <Project>\Source\), I get the same exact error as my original post.
                Last edited by _Auron_; 11-17-2016, 08:42 PM.

                Comment


                  #9
                  I found out the problem, and it's so stupid. I had "Launch" in my plugin's PublicDepedencyModuleNames which was causing all of this. I figured it out by stripping down my plugin while comparing it to a new sandbox plugin that I made from the editor's Plugin menu in a separate project, and comparing it with my own as the bare-bones plugin built just fine and listed in the editor.

                  What a hard lesson to learn here. If anything I hope anyone else who may run into this problem finds this thread so they don't make the same mistake I did.

                  Comment


                    #10
                    I wander if I do need Launch module to be linked, how should I make this error gone?

                    Comment


                      #11
                      I tried deleting the Launch module but still get the same error. What's strange is that this plugin gives me problems only with a particular project, fresh ones are fine. Where can I look for probable incompatibilities or settings that prevent its build

                      Comment


                        #12
                        Thank you so much _Auron_. Had been dealing with this issue for weeks and it sure enough was the "Launch" module.

                        Comment

                        Working...
                        X