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

error C2607: static assertion failed in CommonLibSF.vcxproj #11

Open JasonJShuler opened 1 month ago

JasonJShuler commented 1 month ago

First time touching any of this - trying to get a plugin updated for SF 1.11.36. First I pulled an example plugin, but it refused to build, so I tried generating a new one from this template, and I'm getting the same - lots and lots of assertion failures from CommonLibSF -- locally and on the github action.

To say my c++ is weak is an understatement... so apologies if this is intuitively obvious to those who know what they are doing.. Help is greatly appreciated!

The action output is here: https://github.com/One-Of-A-Kind-Mods/sf-btdt/actions/runs/9279872754/job/25533170897

  CommonLibSF.vcxproj -> D:\a\sf-btdt\sf-btdt\build\CommonLibSF\CommonLibSF\Debug\CommonLibSF.lib
  Building Custom Rule D:/a/sf-btdt/sf-btdt/Plugin/CMakeLists.txt
D:\a\sf-btdt\sf-btdt\extern\CommonLibSF\CommonLibSF\include\RE\B\BGSConstructibleObject.h(46,47): error C2607: static assertion failed [D:\a\sf-btdt\sf-btdt\build\Plugin.vcxproj]
    static_assert(sizeof(BGSConstructibleObject) == 0x1A0);
                                                 ^ (compiling source file 'CMakeFiles/Plugin.dir/cmake_pch.cxx')

D:\a\sf-btdt\sf-btdt\extern\CommonLibSF\CommonLibSF\include\RE\D\DebuggerMessages.h(6,35): error C2607: static assertion failed [D:\a\sf-btdt\sf-btdt\build\Plugin.vcxproj]
  static_assert(sizeof(std::string) == 0x20);  // If this fails, _ITERATOR_DEBUG_LEVEL is greater than 0
                                    ^ (compiling source file 'CMakeFiles/Plugin.dir/cmake_pch.cxx')

D:\a\sf-btdt\sf-btdt\extern\CommonLibSF\CommonLibSF\include\RE\D\DebuggerMessages.h(7,40): error C2607: static assertion failed [D:\a\sf-btdt\sf-btdt\build\Plugin.vcxproj]
  static_assert(sizeof(std::vector<int>) == 0x18);
                                         ^ (compiling source file 'CMakeFiles/Plugin.dir/cmake_pch.cxx')

D:\a\sf-btdt\sf-btdt\extern\CommonLibSF\CommonLibSF\include\RE\D\DebuggerMessages.h(8,48): error C2607: static assertion failed [D:\a\sf-btdt\sf-btdt\build\Plugin.vcxproj]
  static_assert(sizeof(std::vector<std::string>) == 0x18);
                                                 ^ (compiling source file 'CMakeFiles/Plugin.dir/cmake_pch.cxx')
JamesCPosey commented 3 weeks ago

Saying this as someone who just spent like an hour fiddling with this, try running the commands from the terminal as written in the instructions instead of using the VS Build. Only way I managed to get a .dll to build