Description
Compiling on Mingw-W64 x86_64-ucrt-posix-seh 11.2.0 causes the program to do undefined things such as crash when creating a const struct and corrupts data that is imported.
I am trying to include image and audio resources via Incbin and then placing them into a struct so I get the file size and the pointer to the data into one varible. This is done as follows
#define RES_INC(name, path) INCBIN(name, path); const struct file_struct s_ ## name = {g ## name ## Data, g ## name ## Size};
Looking at the program in gdb, it crashes when making the struct rater than the INC bin. It crashes at
__static_initialization_and_destruction0
This happens after the first included file was added successfully. The file_struct struct is as follows
struct file_struct { const unsigned char * data; size_t size; };
if I add a bunch of padding ints after each struct the program runs but other varibles that are in other .cpp files are being altered
Activity