Hi,
I found a strange Behavior in Pelles C and i dont know a workaround for now.
Here is my Problem:
//Typedef of a later used Datatable
typedef struct
{
DWORD Address;
DWORD Value;
} Patch;
first i declared a Data Table:
unsigned char Table_Test[]=
{
0xCA,0x00,0x00,0x00,0xC0,0xFF,0xFF,0xFF,0xFA,0x00,0x00,0x00,0x0C,0x00,0x00,0x00
};
then i make another Table:
static Patch TestPatch[] =
{
{(DWORD) Table_Test,0}
};
all i get is this: #2069: Initializer must be constant.
in Visual Studio and gcc this works fine.
The same Problem occurs when i want to get the adress of an already written function into the Table
like this:
static Patch TestPatch2[] =
{
{(DWORD) MyFunc,0}
};
again: Initializer must be constant.
i dont get it because i can use fine:
myfunc2(&Myfunc)
I dont know the Reason for this Error because it makes no sense.
Any Help is appreciated because i already tried all possible combinations i know to go around it.
Greetings
Seltsamuel