fpwong / BlueprintAssistWiki

47 stars 2 forks source link

Linker problem when compiling the plugin #149

Closed Lawendt closed 1 year ago

Lawendt commented 1 year ago

Hello, we're trying to use the plugin on a custom engine. It worked fine on 5.1, but now updating to 5.3 this link error appears:

0>BlueprintAssistNodeActions.cpp.obj: Error  : LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl FWindowsPlatformApplicationMisc::ClipboardCopy(wchar_t const *)" (__imp_?ClipboardCopy@FWindowsPlatformApplicationMisc@@SAXPEB_W@Z) referenced in function "public: void __cdecl FBANodeActions::CutAndLink(void)" (?CutAndLink@FBANodeActions@@QEAAXXZ)
0>UnrealEditor-BlueprintAssist.dll: Error  : LNK1120: 1 unresolved externals

I followed the steps on the documentation, I deleted the whole folder before adding the new folder with the new things...

Lawendt commented 1 year ago

Ok, it seems it might be something related to our project using c++20? idk. In any case I fixed by moving the include of the ApplicationCore module to the PublicDependencyModuleNames

fpwong commented 1 year ago

Hi @Lawendt, thanks for letting me know. On my side, changing to C++ 20 does not cause this issue.

Tbh I am not very familiar with the workings of the build system, just enough to get everything running.

Looking at this page it says:

So if A publicly requires B but privately requires C, the Include paths and defines specified by C don't get added to your module when you include A`

So if you had a plugin that privately included an SDK's include paths/etc., then including that plugin wouldn't make the SDKs include paths as part of your include paths

This leads me to think that this could be part of your project requiring ApplicationCore, however your build error says otherwise. Just to make sure, could you try adding ApplicationCore to your project's build.cs (in PublicDependencyModuleNames) and see if this fixes it?

Lawendt commented 1 year ago

Before upgrading the BP assist plugin this wasn't an issue so I don't think it's another part of our project requiring ``ApplicationCore (but I might be wrong)

anyway... it worked by adding ApplicationCore to our project build.cs so 🤷‍♀️

fpwong commented 1 year ago

Thanks, if that did fix the compile issue then I do believe this is an issue with your project 👍

If you have time to do one more test, try running the plugin on a fresh 5.3 project. If that fails for some reason I will reopen this issue.