Tricky to get this combination operational. The wiki entry is helpful for configuration. Not finding any of the Objective-C libraries in the default installation, we located what might be the correct support files on the TDM site. But after adding these matched libraries, we ended up with compiler warnings and a segmentation fault during the first alloc, using the simple test code on the wiki page. Next thing to try was the troubleshooting suggestion of removing libobjc.dll.a ... but that resulted in a laundry list of "undefined reference to" ... precisely the message the wiki entry claims the removal will avoid!
Finally, what worked was removing the entire mingw installation from the CodeBlocks directory (just delete everything in the mingw directory, version 4.7.1) and install mingw using the installer referenced on the mingw website. During installation, set the install directory to the mingw directory under CodeBlocks and then select to install the C, C++, and Objective-C compilers. This resulted in a good installation of GCC 4.6.2, a warning-free compile, and a faultless run...yay!!! (Remember, you cannot do any Apple development with this configuration, so including foundation.h is not allowed. But you can learn and play with the fundamentals of the Objective-C language on the Windows platform in preparation for moving to a Mac for iOS or OSX app development.)
"The only reason for time is so that everything doesn't happen at once." -Albert Einstein
20130603
Subscribe to:
Post Comments
(
Atom
)
Thanks; This was really helpful. I just needed to add the path to Environment Variables, and tell CodeBlocks to autodetect the MINGW directory!
ReplyDelete