gottyduke / SF_PluginTemplate

Plugin template for SFSE plugins. click "Use this template" to generate your project.
GNU General Public License v3.0
38 stars 9 forks source link

Unable to build for Debug - Static Assert Failed #10

Closed SellingEngland closed 4 months ago

SellingEngland commented 4 months ago

Hello, thank you for this template. I'm trying to use it to create a mod but I am unable to build for Debug in Visual Studio (Release works fine). I get the following error: \CommonLibSF\CommonLibSF\include\RE\B\BGSAffinityEvent.h(41,41): error C2607: static assertion failed 3> static_assert(sizeof(BGSAffinityEvent) == 0x80);

There's about 40 or so of those static asserts failing. What can be done to fix this? Is it something I'm doing wrong?

gottyduke commented 4 months ago

First make sure the extern submodules are updated by running update-submodule.bat Second build in release mode, because various errors like you mentioned are due to stl containers having different size/layout in debug / release builds, which wasn't the case in Skyrim because Bethesda used homebrew containers, whereas in Starfield they started using stl containers like std::vector