Hi,
just to prove things work out of the box if you forget libobjc2
and use gcc...
I also attach a screenshot. Full power on windows! Including basic
windows theme with in-windows menus.
This is my output of copy&pasting your program into
ProjectCenter on Windows 7
This means I have a working msys2, working core stuff, working
ProjectCenter and working program of yours.
class GSDictionaryKeyEnumerator in thread <NSThread:
0x322ad0>{name = (null), num = 1256}
2023-07-06 02:01:32.510 objtest[3752:1256] autorelease called
without pool for object (0x2188960) of class GSMutableDictionary
in thread <NSThread: 0x322ad0>{name = (null), num = 1256}
1111111111111111111111111111111111111
222222222222222222222222222222222
3333333333333333333333333333333333333
2023-07-06 02:01:32.619 objtest[3752:1256] autorelease called
without pool for object (0x20f9ac0) of class NSUserDefaults in
thread <NSThread: 0x322ad0>{name = (null), num = 1256}
2023-07-06 02:01:32.619 objtest[3752:1256] autorelease called
without pool for object (0x220d4b0) of class NSCalendarDate in
thread <NSThread: 0x322ad0>{name = (null), num = 1256}
2023-07-06 02:01:32.619 objtest[3752:1256] autorelease called
without pool for object (0x2189300) of class GSWindowsTimeZone in
thread <NSThread: 0x322ad0>{name = (null), num = 1256}
2023-07-06 02:01:32.619 objtest[3752:1256] autorelease called
without pool for object (0x2112350) of class GSCInlineString in
thread <NSThread: 0x322ad0>{name = (null), num = 1256}
2023-07-06 02:01:32.619 objtest[3752:1256] autorelease called
without pool for object (0x220c430) of class NSDataMalloc in
thread <NSThread: 0x322ad0>{name = (null), num = 1256}
2023-07-06 02:01:32.619 objtest[3752:1256] autorelease called
without pool for object (0x2155020) of class GSAutoreleasedMemory
in thread <NSThread: 0x322ad0>{name = (null), num = 1256}
2023-07-06 02:01:32.619 objtest[3752:1256] Helo RK
so quite powerful.
To remove these warnings, I did alloc an AutoreleasePool (and then
release it) with:
NSAutoreleasePool *arp = [[NSAutoreleasePool alloc] init];
this yields:
2023-07-06 02:07:24.052 objtest[5008:4848] Helo RK
1111111111111111111111111111111111111
222222222222222222222222222222222
3333333333333333333333333333333333333
Maybe this helps you in your setup too? In any case, it proves
that gcc setup works out of the box.
Riccardo