modio / modio-ue4-legacy

Unreal Engine 4 Plugin for integrating mod.io - a modding API for game developers
https://mod.io
MIT License
85 stars 14 forks source link

Fix Warnings for >=4.24 #29

Closed freezernick closed 3 years ago

freezernick commented 3 years ago

Since the 4.24 update there were some warnings regarding the library paths. With using the UE_4_X_OR_LATER this can be suppressed / fixed while remaining functional for lower versions.

I haven't checked compiling for versions below 4.24 though.

MarkusRannare commented 3 years ago

Thank you for the contribution. I'm going to check how well this compiles against 4.23->4.25 when I have completed my current task(s)

MarkusRannare commented 3 years ago

So I have finally come around to do this. I tried compiling in 4.24 and 4.23, but the 4.23 didn't link anymore after your changes.

It's a simple fix:

#if UE_4_24_OR_LATER
            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "modio.lib"));
#else
            PublicLibraryPaths.Add(LibrariesPath);
            PublicAdditionalLibraries.Add("modio");
#endif

should be

#if UE_4_24_OR_LATER
            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "modio.lib"));
#else
            PublicLibraryPaths.Add(LibrariesPath);
            PublicAdditionalLibraries.Add("modio.lib");
#endif

I can easily fix that on my side, but if you want to fix the pull request, I would be happy to merge it into the repo so that credit goes to the right source. This is just tested on windows, so I would expect all 3 libraries needs to be updated

MarkusRannare commented 3 years ago

Just ensure, does the thumbs up mean that you want me to fix it, if so react with 👍 ;)

MarkusRannare commented 3 years ago

This has been resolved when I did some other work on cross platform code