[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GCC 4.6 under MinGW
From: |
Nicola Pero |
Subject: |
Re: GCC 4.6 under MinGW |
Date: |
Sat, 14 May 2011 22:50:40 +0200 |
> if anyone is interested in using GCC 4.6 under MinGW, here is a precompiled
> version:
> http://www.xvidvideo.ru/component/docman/cat_view/28-cross-mingwgcc-x86x64/183-cross-mingw-with-gcc-46-x86x64/188-experimental--pre-release.html
At a quick glance, GCC seems to have been compiled with --disable-shared. That
will produce an Objective-C runtime that is unfit for purpose on Windows;
it has to be compiled as a shared library to work.
... but, of course, you could use an existing Objective-C runtime already
compiled as a DLL. That should work; you just need to reconfigure and recompile
gnustep-make and gnustep-base (and everything else), keeping the runtime you
already have. :-)
> I've tried to combine this with prebuilt binary of GNUstep for Windows, and
> compile Zcode. Of course, that failed:
> undefined reference to `objc_getPropertyStruct'
> I presume this is because runtime shipped with the above GCC 4.6 does not
> support properties.
Just to clarify, the runtime shipped with GCC 4.6 fully supports properties (to
the extent supported by GCC 4.6). The undefined symbol
must arise as a consequence of a different problem; as you mention a
"precompiled GNUstep" below, I'd suspect that the runtime from this
precompiled GNUstep is being used instead of the one from GCC 4.6. I still
suspect the one from 4.6 won't work (because of the --disable-shared
discussed above).
But you may just try to reconfigure/recompile gnustep-make and gnustep-base and
see if that works, since gnustep-base should support
a compiler with property support mixed with a runtime without it, but you may
need to reconfigure/recompile to get the new combination recognized
and things updated for it.
> Trying to compile with non-POSIX threading also fails:
> This is gnustep-make 2.6.0. Type 'make print-gnustep-make-help' for help.
> Making all for clibrary libobjc...
> Linking clibrary libobjc ...
> Creating library file: ./obj/libobjc.dll.a
> obj/libobjc.obj/Object.m.o: In function `-[Object error:]':
> c:\Users\ivucica\Downloads\gnustep\libobjc/Object.m:329: undefined reference
> to
> `__gnu_objc_personality_sj0'
This suggests a problem with native exceptions (which may hit you later on even
if you don't compile the runtime); try configuring gnustep-make
with --disable-native-exceptions. Just try to get it working in some way, then
you can go back and try enabling native exceptions again. ;-)
I haven't tried GCC 4.6 on Windows yet myself; if I get access to a Windows
machine, I'll try and update the instructions if needed.
Thanks