Closed Lildreas closed 3 years ago
@Lildreas I think the problem may be that you haven't built the RelWithDebInfo
configuration of cesium-native. When you're following the cesium-native build instructions, at the step where you would normal do this for an in-editor debug build:
cmake --build build --config Debug
You should instead do this:
cmake --build build --config RelWithDebInfo
This should be true of the cesium-unreal-demo project as well, but it may be working there because you built the RelWithDebInfo configuration sometime in the past.
Hi,
thanks for the fast help!
I did as you suggested and build the cesium-native manually, created a build folder in cesium-native and the Cesium3DTiles.lib now was build in the followinf folder, have a look at the screenshot: C:\Users\andreas.lepel\Desktop\CESIUM_TEST\Plugins\cesium-unreal\extern\cesium-native\build\Cesium3DTiles\RelWithDebInfo
But the packaging still breaks, because the lib is expected at another path, where it's "extern\build\cesium-native", not "extern\cesium-native\build". That is so similar taht's it's hard to catch. :-D
UATHelper: Packaging (Windows (64-bit)): LINK : fatal error LNK1181: cannot open input file 'C:\Users\andreas.lepel\Desktop\CESIUM_TEST\Plugins\cesium-unreal\Source\Cesium\..\..\extern\build\cesium-native\Cesium3DTiles\RelWithDebInfo\Cesium3DTiles.lib'
Any ideas how to fix this? I don't want to just copy the stuff to correct the path issue.
Thanks, Andreas
@Lildreas it sounds like you may have built cesium-native from the cesium-native
directory instead of from the extern
directory. There's a note in the README:
NOTE: You must build with the CMakeLists.txt in the Plugins/cesium-unreal/extern, not the one in Plugins/cesium-unreal/extern/cesium-native.
Let me know if that's not the case and I'll look closer.
Hi Kevin,
I started again from scratch and documented what I did:
1) Cloned cesium-unreal into the Plugins folder, with the submodules 2) cd Plugins/cesium-unreal/extern 3) mkdir build 4) cmake -B build -S . 5) cmake --build build --config Debug 6) Started the .uproject file, was asked to rebuild "Cesium", did it 7) Packaged Project with "Shipping" configuration, got the error again:
UATHelper: Packaging (Windows (64-bit)): LINK : fatal error LNK1181: cannot open input file 'C:\Users\andreas.lepel\Desktop\CESIUM_TEST\Plugins\cesium-unreal\Source\Cesium....\extern\build\cesium-native\Cesium3DTiles\RelWithDebInfo\Cesium3DTiles.lib'
8) I now Packaged Project with "Debug Game" configuration => this worked!
9) Now I did "cmake --build build --config RelWithDebInfo" in the same Plugins/cesium-unreal/extern folder 10) Started the project again 11) Packaged Project with "Shipping" configuration again => now this worked, too
After this I re-visited the cesium-unreal-demo and tried to package the project with "Shipping" configuration, and it didn't work anymore - so when it worked the first time it only worked because the Build Configuration was set to "Debug Game" or "Development".
So, the solution seems to be that if you want to build with "Shipping" configuration then building the native again using "cmake --build build --config RelWithDebInfo" is needed.
Maybe add this to the documentation?
Thanks for the lighning fast support & best from Germany Andreas
So, the solution seems to be that if you want to build with "Shipping" configuration then building the native again using "cmake --build build --config RelWithDebInfo" is needed.
Yep that's exactly right! And agreed, it needs to be in the documentation. Or, ideally, we'd figure out how to make the Unreal build automatically trigger the cesium-native CMake-based build. But I'm not sure how realistic that is. :)
I guess a hint in the documentation would be enough, from end of March on in my understanding the plugin will be downloadable directly from the Unreal Marketplace anyhow, with all options included.
BTW, congrats again for the awesome work on this plugin!
Should I close the issue or should I let it remain open as a remainder and you will do it after adding the comment to the documentation? :-)
Let's leave it open as a reminder for the documentation. I changed the title to make that more clear. Thanks!
Hello,
I can run the cesium-unreal-demo in the editor, and I can package the project and then run the exe, works well.
But when I try to add the plugin to my existing project the plugin itself works in the editor, but I cannot package the project anymore, I get an error, see below.
BTW, I added the cesium plugin by checking out the GitHub repo to the Plugin folder of my existing project. Then I followed the make-steps for the plugin (same as in the cesium-unreal-demo, re-created the VS solution files, compiled Cesium when UE started and the plugin works fine in the existing project - only the packaging doesn't work).
The output log: