So previously I was able to create blueprint function libraries just fine. I was using 4.8.3 on Windows 8.1. The same workflow I was using then no longer works ever since I moved to Windows 10.
The process is:
- Start a new project (either C++ or BP empty project, doesn’t matter which, no starter content just a fresh project, both 4.8.3 and 4.9, makes no difference)
- Project is generated, C++ projects generate the VS project files here no problem. VS opens.
- Create a new C++ class, BP Function Library. BP project generates the VS project files here no problem.
- Compile in both editor and build in VS work at this point without issues.
- Add the below code to the cpp and h files the function lib generated.
- Re-build in VS. Link error (as below) This causes the “Compile” button to disappear from the editor until it is restarted.
- Building again apparently succeeds for some reason.
- Functions do not show up in the blueprint editor as they did before this started happening.
Link errors: Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
h file:
public:
UFUNCTION(BlueprintCallable, meta = (DisplayName = "TestFunction"), Category = "ATestCategory")
static void TestFunction();
cpp file:
void TestFunction() {
}
This happens regardless of whether I select “public” or “private” or nothing during creation of the class, and regardless of whether I add the “public:” line, or “static” before the function declaration.
I thought it might be due to the fact that I didn’t do a fresh install of 10. So I completely uninstalled UE4 and Visual Studio and all of their dependencies (which took forever filtering through the installed programs list, ■■■■ it all) and rebooted, then reinstalled both from scratch. The latest version of VS2013 Community, Update 5, and reinstalled UE4.
Nothing changed. At this point I’m considering completely reinstalling Windows…
I’ve uploaded a video where the issues take place:
This happening to anyone else?
Does anyone have any idea why the compile button disappears if the linker fails in VS?
Am I doing something wrong with my workflow that was working before?