Can't rebuild C++ module

I’ve just put together my first C++ project. I’ve built a new class that inherits from an existing class and it builds without errors.

When I load the associated UE project, I get a message saying “the following modules are missing or built with a different engine version” followed by the dll for my module.

If I let it rebuild the module, it fails and says that it could not be rebuilt.

This is probably symptomatic of me being new to C++ and VS, since all the hard stuff I’ve encountered so far are VS things. Any idea what I should be doing here?

I’ve seen it suggested that this problem happens less if you build the engine from source as well. Going to try it, but does that make sense?

I’ve checked the logs and it’s pretty clear why it’s not rebuilding - and it’s an issue I already solved earlier. Exactly the same issue.

[2015.07.12-09.20.19:447][  0]CelShaderVolume.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl APostProcessVolume::PostUnregisterAllComponents(void)" (?PostUnregisterAllComponents@APostProcessVolume@@UEAAXXZ) referenced in function "public: virtual void __cdecl ACelShaderVolume::PostUnregisterAllComponents(void)" (?PostUnregisterAllComponents@ACelShaderVolume@@UEAAXXZ)

I resolved this by ensuring the right headers were included and the external dependencies were added to the project. It builds fine in VS 2013 - why’s UE having problems when it rebuilds it?

This is after using the standard precompiled binaries from Epic. I’m busy building the engine myself right now, which I suspect will solve the problem because the engine source is still preset. Would that make sense?

That’s all in order - not the issue (at least when I build it in VS2013)

It only seem to be a problem when the UnrealBuiltTool has a go at it - are there any special cases that need to be handled between VS2013 and the UBT?

I had a similar error once and solved it by including the module in my build.cs and including the correct .h in my files.

Seems like your problem is with APostProcessVolume | Unreal Engine Documentation so make sure you include Engine in build.cs and Runtime/Engine/Classes/Engine/PostProcessVolume.h in CelShaderVolume.cpp.

Well, after randomly poking around (and I have no idea what I did - perhaps it was a restart?) it’s now building in the UBT. It used 12 threads and lots of CPU for quite a while.

The build looks to be complete and nothing’s using much CPU but it’s pretty much just sitting there saying 'starting build…" but with a full progress bar.

Building in VS takes just over a minute, this has taken about 10 minutes so far.

Update: nevermind, after another five minutes it bailed out with the same issues in the log.

Same problem here. Engine is in build.cs. Header is included.
My best guess is that at link time it’s linking to non-editor built DLL of engine for some reason, despite it being compiled against developmentEditor.

this seems further supported by the fact the identical code compiles fine with Development target vs DevelopmentEditor target.

Oh wow, actually it’s worse than this. looking in PostProecssVolume.h, there are in fact 2 methods declared that do not have body definitions in the cpp file in unmodified engine code in 4.8.3

// Begin AActor Interface
virtual void PostUnregisterAllComponents( void ) override;

protected:
virtual void PostRegisterAllComponents() override;
// End AActor Interface

I think it compiles in the regular development build because the PostProcessComponent is something used by the editor, no the other runtimes.

I’m still stuck with it too, although I’m erring towards trying to write a holder blueprint with some UI on the front instead now.