Skip to content

Fix compile error on 4.10#1

Merged
erbridge merged 3 commits intoerbridge:masterfrom
cpburnz:master
Nov 16, 2015
Merged

Fix compile error on 4.10#1
erbridge merged 3 commits intoerbridge:masterfrom
cpburnz:master

Conversation

@cpburnz
Copy link
Copy Markdown
Contributor

@cpburnz cpburnz commented Nov 16, 2015

When compiling UE4Editor v4.10, I get the following error:

[602/792] Compile Module.SublimeTextSourceCodeAccess.cpp
In file included from /mnt/data/home/caleb/Downloads/UnrealEngineTest/Engine/Plugins/Developer/SublimeTextSourceCodeAccess/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UE4Editor/Development/SublimeTextSourceCodeAccess/Module.SublimeTextSourceCodeAccess.cpp:2:
In file included from /mnt/data/home/caleb/Downloads/UnrealEngineTest/Engine/Plugins/Developer/SublimeTextSourceCodeAccess/Source/SublimeTextSourceCodeAccess/Private/SublimeTextSourceCodeAccessModule.cpp:24:
/mnt/data/home/caleb/Downloads/UnrealEngineTest/Engine/Plugins/Developer/SublimeTextSourceCodeAccess/Source/SublimeTextSourceCodeAccess/Private/SublimeTextSourceCodeAccessModule.h:35:36: error: field type 'FSublimeTextSourceCodeAccessor' is an abstract class
    FSublimeTextSourceCodeAccessor SublimeTextSourceCodeAccessor;
                                   ^
Developer/SourceCodeAccess/Public/ISourceCodeAccessor.h:18:15: note: unimplemented pure virtual method 'RefreshAvailability' in 'FSublimeTextSourceCodeAccessor'
        virtual void RefreshAvailability() = 0;
                     ^
In file included from /mnt/data/home/caleb/Downloads/UnrealEngineTest/Engine/Plugins/Developer/SublimeTextSourceCodeAccess/Intermediate/Build/Linux/x86_64-unknown-linux-gnu/UE4Editor/Development/SublimeTextSourceCodeAccess/Module.SublimeTextSourceCodeAccess.cpp:2:
/mnt/data/home/caleb/Downloads/UnrealEngineTest/Engine/Plugins/Developer/SublimeTextSourceCodeAccess/Source/SublimeTextSourceCodeAccess/Private/SublimeTextSourceCodeAccessModule.cpp:26:1: error: cannot initialize return object of type 'IModuleInterface *' with an rvalue of type 'FSublimeTextSourceCodeAccessModule *'
IMPLEMENT_MODULE( FSublimeTextSourceCodeAccessModule, SublimeTextSourceCodeAccess );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Runtime/Core/Public/Modules/ModuleManager.h:683:11: note: expanded from macro 'IMPLEMENT_MODULE'
                        return new ModuleImplClass(); \
                               ^~~~~~~~~~~~~~~~~~~~~
2 errors generated.

ISourceCodeAccessor appears to have a new unimplemented virtual method:

virtual void RefreshAvailability() = 0;

The NullSourceCodeAccess implementation simply defines the method as:

virtual void RefreshAvailability() override { }

Adding this method to FSublimeTextSourceCodeAccessor fixes the issue, and compiles properly. NOTE: This fix will likely cause SublimeTextSourceCodeAccess to fail to compile on earlier versions of UE4Editor because the new method is overridden.

erbridge added a commit that referenced this pull request Nov 16, 2015
Fix compile error on 4.10
@erbridge erbridge merged commit c3db6d6 into erbridge:master Nov 16, 2015
@erbridge
Copy link
Copy Markdown
Owner

Thanks :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants