Skip to main content
cb43551664
Inspiring
December 27, 2022
Question

SDK Visual Studio 2022 not building majority of examples with BuildAll.sln

  • December 27, 2022
  • 1 reply
  • 1330 views

I am trying to compile all of the examples in the SDK ( October2021_AfterEffectsSDK_Windows ) but more than half error out with Visual Studio 2022. 

 

Any advice would be appreciated as online tutorials are not up to date.

 

There are two types of errors similar to these :

 

Error C2338 static_assert failed: 'Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnostic can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined.' Resizer C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winnt.h 2535

 

Error RC1015 cannot open include file 'afxres.h'. Streamie F:\loco\Desktop\pluginsCH\learning\October2021_AfterEffectsSDK_Windows\AfterEffectsSDK\Examples\AEGP\Streamie\Win\Streamie_PiPL.rc

This topic has been closed for replies.

1 reply

Mylenium
Legend
December 27, 2022

Have you actually included all your paths in the project and copied all the files retaining the relative structure? Also put your programming stuff into a dedicated folder on your drive, not the desktop, and set it up correctly in your VS project. Anything more will require exact info about all this stuff and your build options, but I'm pretty sure once you straighten out your messy file paths things will work.

 

Mylenium

cb43551664
Inspiring
December 27, 2022

I was able to get it to work by using 2019 and manually changing the code generation settings Struct Member Alignment to default from 4 Byte (/Zp4) and it now works. 

 

The project relative structure seems fine and I am getting working .aex files but there are a few hard coded paths are giving non fatal errors. 

 

Thank you

cb43551664
Inspiring
December 27, 2022

One more step was necessary. I had to replace

#include "afxres.h" with #include "windows.h"

 

And I set proper output directories, etc. as per Mylenium's recommendation