Objective-C is one of the older languages on the list.…Invented in the early 80s as an object oriented version of C, it really is the C…language with some extra stuff added to it.…That extra stuff makes it object-oriented.…The way it's used these days one of the benefits of using Objective-C is it…comes with a large library referred to as Cocoa which we will talk about in a moment.…It is a compiled language.…Not interpreted and not one that uses intermediate bytecode.…
The classic Objective-C programming language for iPad, iPhone and iPod touch. Programming language is a perfect tool for studying, complex mathematical calculation, entertainment and many other. Objective C, free objective c software downloads. Saddle is an Objective-C library or framework that is designed to link to the SDL library and provide its functions in a more object oriented way along with other useful functions for graphics intense applications.
And although, it's a high-level language, it is one where you need to be a bit…more aware about memory management than things like Java or the .NET languages.…It uses something called reference counting, where we keep track of the objects…that we create and whether we're done with them or not.…Although advances in the language means that this is becoming less and less of…an issue, but because of that I wouldn't say it's a particularly friendly…language for beginners.…You really need kind of an intermediate level of skill to be messing with Objective-C.…
Active3 months ago
What would be the best way to write Objective-C on the Windows platform?
Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio?
Along those lines - are there any suggestions as to how to link in and use the Windows SDK for something like this. Its a different beast but I know I can write assembly and link in the Windows DLLs giving me accessibility to those calls but I don't know how to do this without googling and getting piecemeal directions.
Is anyone aware of a good online or book resource to do or explain these kinds of things?
Cœur
22.8k1010 gold badges130130 silver badges188188 bronze badges
Luther BakerLuther Baker
3,6261111 gold badges4343 silver badges6161 bronze badges
13 Answers
Expanding on the two previous answers, if you just want Objective-C but not any of the Cocoa frameworks, then gcc will work on any platform. You can use it through Cygwin or get MinGW. However, if you want the Cocoa frameworks, or at least a reasonable subset of them, then GNUStep and Cocotron are your best bets.
Cocotron implements a lot of stuff that GNUStep does not, such as CoreGraphics and CoreData, though I can't vouch for how complete their implementation is on a specific framework. Their aim is to keep Cocotron up to date with the latest version of OS X so that any viable OS X program can run on Windows. Because GNUStep typically uses the latest version of gcc, they also add in support for Objective-C++ and a lot of the Objective-C 2.0 features.
Objective-c Tutorial
I haven't tested those features with GNUStep, but if you use a sufficiently new version of gcc, you might be able to use them. I was not able to use Objective-C++ with GNUStep a few years ago. However, GNUStep does compile from just about any platform. Cocotron is a very mac-centric project. Although it is probably possible to compile it on other platforms, it comes XCode project files, not makefiles, so you can only compile its frameworks out of the box on OS X. It also comes with instructions on compiling Windows apps on XCode, but not any other platform. Basically, it's probably possible to set up a Windows development environment for Cocotron, but it's not as easy as setting one up for GNUStep, and you'll be on your own, so GNUStep is definitely the way to go if you're developing on Windows as opposed to just for Windows.
For what it's worth, Cocotron is licensed under the MIT license, and GNUStep is licensed under the LGPL.
bames53
72.1k1010 gold badges140140 silver badges205205 bronze badges
Michael BuckleyMichael Buckley
3,89711 gold badge2323 silver badges2323 bronze badges
You can use Objective C inside the Windows environment. If you follow these steps, it should be working just fine:
All the best, and have fun with Objective-C!
NOTES:
1,86377 gold badges3737 silver badges6161 bronze badges
teshguruteshguru
3,13911 gold badge1414 silver badges66 bronze badges
Also:
The Cocotron is an open source project which aims to implement a cross-platform Objective-C API similar to that described by Apple Inc.'s Cocoa documentation. This includes the AppKit, Foundation, Objective-C runtime and support APIs such as CoreGraphics and CoreFoundation.
amroxamrox
6,01811 gold badge3232 silver badges5656 bronze badges
WinObjC? Windows Bridge for iOS (previously known as ‘Project Islandwood’).
Windows Bridge for iOS (also referred to as WinObjC) is a Microsoft open source project that provides an Objective-C development environment for Visual Studio/Windows. In addition, WinObjC provides support for iOS API compatibility. While the final release will happen later this fall (allowing the bridge to take advantage of new tooling capabilities that will ship with the upcoming Visual Studio 2015 Update),
The bridge is available to the open-source community now in its current state. Between now and the fall. The iOS bridge as an open-source project under the MIT license. Given the ambition of the project, making it easy for iOS developers to build and run apps on Windows.
Salmaan Ahmed has an in-depth post on the Windows Bridge for iOS http://blogs.windows.com/buildingapps/2015/08/06/windows-bridge-for-ios-lets-open-this-up/ discussing the compiler, runtime, IDE integration, and what the bridge is and isn’t. Best of all, the source code for the iOS bridge is live on GitHub right now.
The iOS bridge supports both Windows 8.1 and Windows 10 apps built for x86 and x64 processor architectures, and soon we will add compiler optimizations and support for ARM, which adds mobile support.
Lee StottLee Stott
I have mixed feelings about the Cocotron project. I'm glad they are releasing source code and sharing but I don't feel that they are doing things the easiest way.
Examples.
Apple has released the source code to the objective-c runtime, which includes properties and garbage collection. The Cocotron project however has their own implementation of the objective-c runtime. Why bother to duplicate the effort? There is even a Visual Studio Project file that can be used to build an objc.dll file. Or if you're really lazy, you can just copy the DLL file from an installation of Safari on Windows.
They also did not bother to leverage CoreFoundation, which is also open sourced by Apple. I posted a question about this but did not receive an answer.
I think the current best solution is to take source code from multiple sources (Apple, CocoTron, GnuStep) and merge it together to what you need. You'll have to read a lot of source but it will be worth the end result.
Matthieu CormierMatthieu Cormier
I'm aware this is a very old post, but I have found a solution which has only become available more recently AND enables nearly all Objective-C 2.0 features on the Windows platform.
With the advent of gcc 4.6, support for Objective-C 2.0 language features (blocks, dot syntax, synthesised properties, etc) was added to the Objective-C compiler (see the release notes for full details). Their runtime has also been updated to work almost identically to Apple's own Objective-C 2.0 runtime. In short this means that (almost) any program that will legitimately compile with Clang on a Mac will also compile with gcc 4.6 without modification.
As a side-note, one feature that is not available is dictionary/array/etc literals as they are all hard-coded into Clang to use Apple's NSDictionary, NSArray, NSNumber, etc classes.
However, if you are happy to live without Apple's extensive frameworks, you can.As noted in other answers, GNUStep and the Cocotron provide modified versions of Apple's class libraries, or you can write your own (my preferred option).
MinGW is one way to get GCC 4.6 on the Windows platform, and can be downloaded from The MinGW website. Make sure when you install it you include the installation of C, C++, Objective-C and Objective-C++. While optional, I would also suggest installing the MSYS environment.
Once installed, Objective-C 2.0 source can be compiled with:
gcc MyFile.m -lobjc -std=c99 -fobjc-exceptions -fconstant-string-class=clsname (etc, additional flags, see documentation)
![]()
MinGW also includes support for compiling native GUI Windows applications with the
-mwindows flag. For example:
g++ -mwindows MyFile.cpp
I have not attempted it yet, but I imagine if you wrap your Objective-C classes in Objective-C++ at the highest possible layer, you should be able to successfully intertwine native Windows GUI C++ and Objective-C all in the one Windows Application.
EphemeraEphemera
5,29866 gold badges3434 silver badges7474 bronze badges
Software Developer Objectives
Check out WinObjC:
It's an official, open-source project by Microsoft that integrates with Visual Studio + Windows.
James KoJames Ko
13.7k1414 gold badges6262 silver badges152152 bronze badges
If you just want to experiment, there's an Objective-C compiler for .NET (Windows) here: qckapp
NANNAV
4,02344 gold badges2525 silver badges4848 bronze badges
user397362user397362
You can get an objective c compiler that will work with Windows and play nice with Visual Studio 20082010 here.
Just download the latest source. You don't need to build all of CF-Lite there is a solution called objc.sln. You will need to fix a few of the include paths but then it will build just fine. There is even a test project included so you can see some objective-c .m files being compiled and working in visual studio. One sad thing is it only works with Win32 not x64. There is some assembly code that would need to be written for x64 for it to support that.
NANNAV
4,02344 gold badges2525 silver badges4848 bronze badges
Aaron StainbackAaron Stainback
A recent attempt to port Objective C 2.0 to Windows is the Subjective project.
From the Readme:
Subjective is an attempt to bring Objective C 2.0 with ARC support to Windows.
Objective C Basics
This project is a fork of objc4-532.2, the Objective C runtime that ships with OS X 10.8.5. The port can be cross-compiled on OS X using llvm-clang combined with the MinGW linker.
There are certain limitations many of which are a matter of extra work, while others, such as exceptions and blocks, depend on more serious work in 3rd party projects. The limitations are:
• 32-bit only - 64-bit is underway
• Static linking only - dynamic linking is underway
• No closures/blocks - until libdispatch supports them on Windows
• No exceptions - until clang supports them on Windows
Simple jazz guitar chords. Why Free Guitar Tabs Are ImportantGuitarists can learn to read music notation, chord lyrics charts, or guitar tablature. Music notation is a great system, but it isn’t the most modern, or best system for learning modern pop, rock, blues, country and heavy metal guitar songs. It’s a system that takes weeks or even months to learn the basics, while guitar tab can be learned in a matter of minutes.
• No old style GC - until someone cares..
• Internals: no vtables, no gdb support, just plain malloc, no preoptimizations - some of these things will be available under the 64-bit build.
• Currently a patched clang compiler is required; the patch adds -fobjc-runtime=subj flag
The project is available on Github, and there is also a thread on the Cocotron Group outlining some of the progress and issues encountered.
insysinsys
Get GNUStep here
Get MINGW here
Install MINGW Install GNUStep Then Test
raksa engraksa eng
If you are comfortable with Visual Studio environment,
Small project: jGRASP with gccLarge project: Cocotron
I heard there are emulators, but I could find only Apple II Emulator http://virtualapple.org/. It looks like limited to games.
Cloud ChoCloud Cho
First of all, forget about GNUStep tools. Neither ProjectManager nor ProjectCenter can be called an IDE. With all due respect, it looks like guys from GNUStep project are stuck in the late 80-s (which is when NeXTSTEP first appeared).
Vimctags support Objective-C since r771 (be sure to pick the pre-release 5.9 version and add --langmap=ObjectiveC:.m.h to the command line, see here), so you'll have decent code completion/tag navigation.
Here's a short howto on adding Objective-C support to Vim tagbar plugin.
Emacs
The same applies to
etags shipped with modern Emacsen, so you can start with Emacs Objective C Mode. YASnippet will provide useful templates:
and if you want something more intelligent than the basic tags-based code completion, take a look at this question.
Eclipse
CDT supports
Makefile -based projects:
-- so technically you can build your Objective-C projects out of the box (on Windows, you'll need the Cygwin or MinGW toolchain). The only problem is the code editor which will report plenty of errors against what it thinks is a pure C code (on-the-fly code checking can be turned off, but still..). If you want proper syntax highlighting, you can add Eclim to your Eclipse and enjoy all the good features of both Eclipse and Vim (see above).
Another promising Eclipse plugin is Colorer, but it doesn't support Objective-C as of yet. Acdsee ultimate 8 download. Feel free to file a feature request though.
SlickEdit
SlickEdit, among other features of a great IDE, doessupport Objective-C. While it is fairly complex to learn (not as complex as Emacs though), I believe this is your best option provided you don't mind purchasing it (the price is quite affordable).
Additionally, it has an Eclipse plugin which can be used as an alternative to the stand-alone editor.
KDevelop
Rumor has it there exists a KDeveloppatch (15 year old, but who cares?). I personally don't think KDevelop is feature-superior compared to Emacsen, so I wouldn't bother trying it.
The above also applies to Objective-C development on Linux, since all of the tools mentioned are more or less portable.
Community♦
BassBass
1,97622 gold badges1818 silver badges5252 bronze badges
protected by Community♦Feb 17 '13 at 2:16
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead? Not the answer you're looking for? Browse other questions tagged objective-cwindowswinapigcccygwin or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |