Maybe this is just a very silly question please forgive me anyway...
Can I code with ObjC under Windows platform,and/or making use of all
Cocoa's features? Is there any simple IDE that just support
coding ,editing,compiling,building and running such program?
Thanks for you help in advance.
Regards,
Sam
> Greetings to everyone!
>
> Maybe this is just a very silly question please forgive me anyway...
>
>
> Can I code with ObjC under Windows platform,
Yes.
>and/or making use of all
> Cocoa's features?
No, Cocoa is just Mac specific.
> Is there any simple IDE that just support
> coding ,editing,compiling,building and running such program?
Well the only thing which comes near an IDE is from GNUStep. Howerver
my experiences with it are very negative on Linux and so I bet it
won't be much better on Windows.
Regards
Friedrich
--
Please remove just-for-news- to reply via e-mail.
Not a silly question. One that has been asked continuously since
the 80's.
There is a Silly answer though ... No.
Silly because Every other major OS has multitudes of programming
language options
including MS Windows. You can program Windows, MAC, Linux, BSD, Amiga,
etc. in Java,Ruby Python Perl Fortran Smalltalk, xzpltc ... But not
ObjC. You would think it would be simple for a decent Windows API
programmer to adapt the syntax and runtime into a Library and a dll
for Objective-C (Not Cocoa, that is Apple's baby). And it probably is:
but corporate stubborness thinks there is money to be lost by allowing
Mac programs to be built and run on Windows and vice versa, so the
bridge has not been made. There is a fledgling project called the
CoCotron and you can do non-gui
programs with gnu (gcc) on MS platforms.
What is needed for this are major things:
Microsoft to build a bridging structure to accommodate objc;
modify ObjC runtime on MS Windows to work within the C# runtime
Apple to release a MS Windows Cocoa library suite
OR as my college professor used to say:
YOU do the math.
YOU be the one. YOU write the MS Windows Objective-C library.
I tried. I tried and died. There were roadblocks that seemed
to be getting made bigger as time went on. A whole semester
and all I got was a Visual C++ code calling a gcc-compiled objc
library
( no gui you see) so it was frankenstein city. easier to use the
giant
C and c++ codebase than fight the current up a waterfall like a
desperate sex-crazed salmon in search of an Objective-C spawn fest.
(silly answer complete) !?!
Yes. It's possible.
There won't be ALL the features of Cocoa, but a big subset.
Cocoa evolved from OpenStep. NeXT Computer Inc. developed an
implementation of OpenStep running on MS-Windows-NT, but this product
is not sold anymore.
Nowadays, you can use GNUstep. http://www.gnustep.org/
http://www.gnustep.org/experience/Windows.html
GNUstep = OpenStep + a few GNUstep specific extensions
+ a few of Cocoa specific extensions.
Cocoa = OpenStep + a good number of Cocoa specific extensions.
> Is there any simple IDE that just support
> code ,edit,compile,build and run such program?
Yes.
There are TWO IDEs: ProjectCenter and ProjectManager.
The equivalent of Interface Builder, is Gorm.
--
__Pascal Bourguignon__
Thank you all for all your great help!
I followed the above link ,downloaded and installed below in the same
order:
Package Required? Stable Unstable Notes
GNUstep System Required 0.23.0 None MSYS/MinGW System
GNUstep Core Required 0.23.1 None GNUstep Core
GNUstep Devel Optional 1.0.0 None Developer Tools
Cairo Backend Optional 0.22.1 None Don't Use. Developer
Only
•SystemPreferences.app Version 1.0.2-7
•Gorm.app Version 1.2.8
•ProjectCenter.app Version 0.5.0
The installation is sucessfully.But when I run
ProjectCenter.exe,windows reported that can not found gnustep-
base-1_18.dll.I checked and found there is gnustep-base-1_19.dll under
C:\GNUstep\GNUstep\System\Tools.
So was I missing something?Where should I start?
If this is off topic and should be asked in another thread,kindly
ignore it.
Thank you so much again.
Regards,
Sam
Yes, unfortunately, I never used GNUstep on MS-Windows. You will get
better help from the mail lists:
http://www.gnustep.org/information/gethelp.html
--
__Pascal Bourguignon__
> YOU do the math.
>
> YOU be the one. YOU write the MS Windows Objective-C library.
>
> I tried. I tried and died. There were roadblocks that seemed
> to be getting made bigger as time went on. A whole semester
> and all I got was a Visual C++ code calling a gcc-compiled objc
> library
> ( no gui you see) so it was frankenstein city. easier to use the
> giant
> C and c++ codebase than fight the current up a waterfall like a
> desperate sex-crazed salmon in search of an Objective-C spawn fest.
That's not a real suprise or is it? The only Platform you can really
do Objective C programmming well is Mac OS X. It's even more pain than
pleasure on Linux and well Windows, come on you know the answers ;-(
However there is on really stopper. You won't get paid for the work if
you'd even dare to implemement Objective C on Windows. Why should MS
be interested in Objective C. They even have written their own
C-dialkt C#. However if you really look it seems betting an
Objective-C run under .NET seems to be a doable option. At least we
have IronRuby, some Python based on the .NET stuff IIRC, we have F#
and EiffelSharp and and and. It was done (more or less) I never tried
for Mac OS X
http://www.monobjc.net/
> p...@informatimago.com (Pascal J. Bourguignon) writes:
>>
>> Yes, unfortunately, I never used GNUstep on MS-Windows. You will get
>> better help from the mail lists:
>> http://www.gnustep.org/information/gethelp.html
> Well but you insist it's possible to do Objective C programming
> nevertheless....
The more so! If they can write GNUstep in Objective-C and have it run
on MS-Windows, then it will be as easy to write any random MS-Windows
program in Objective-C.
You see, with gcc, it is the same code that produces the executable
for C, C++, Objective-C, etc. Only the front end changes. So there's
no more difficulty in using Objective-C than C.
--
__Pascal Bourguignon__
> Friedrich Dominicus <just-for-...@q-software-solutions.de> writes:
>
>> p...@informatimago.com (Pascal J. Bourguignon) writes:
>>>
>>> Yes, unfortunately, I never used GNUstep on MS-Windows. You will get
>>> better help from the mail lists:
>>> http://www.gnustep.org/information/gethelp.html
>> Well but you insist it's possible to do Objective C programming
>> nevertheless....
>
> The more so! If they can write GNUstep in Objective-C and have it run
> on MS-Windows, then it will be as easy to write any random MS-Windows
> program in Objective-C.
Well I have expressed it wrong. At first. Yes you can do Objective-C
programming if you install GNUstep, but you can not do Cocoa
programmming and you do not have nothing like an IDE on Windows. So
you can write your programs "by hand". The question was about Cocoa an
a decent IDE and to both the clear answer on Windows is it does not
exit and/or it does not work.
The best supported platform for Objective-C programming Mac OS X and
because it's nice Unix also. I'd recommend getting some Mac and write
your programs there. Don't even dare of platform independence in the
GUI section and you'll be quite fine ....
Yes and for those who did not know. There exist POC which claims to be
the one and only Objective-C around....
I'm sorry, but if you had read all my posts in this thread, you should
know that there are IDEs (yes, there are at least TWO IDEs for
GNUstep), and there are tools similar to what is found on Cocoa
(granted, perhaps more rudimentary, but they get the job done) to
design user interfaces.
And of course, you can write programs in GNUstep that you will be able
to compile on MacOSX Cocoa, and vice versa (as long as you only use
the intersection of the features (ie. OpenStep), or if you take care
of optionalize features absent on one platform).
--
__Pascal Bourguignon__
> I'm sorry, but if you had read all my posts in this thread, you should
> know that there are IDEs (yes, there are at least TWO IDEs for
> GNUstep), and there are tools similar to what is found on Cocoa
> (granted, perhaps more rudimentary, but they get the job done) to
> design user interfaces.
Sorry ProjectCenter does not even run smoothless on Linux and the
provided debugger is just an gdb-cli one. So that is not what I
understand under an Integrated Development Environment
>
> And of course, you can write programs in GNUstep that you will be able
> to compile on MacOSX Cocoa, and vice versa (as long as you only use
> the intersection of the features (ie. OpenStep), or if you take care
> of optionalize features absent on one platform).
Sure now show me one useful program in a more wide-spread use.
You do get me wrong, I definitly am a fan of Objective-C but the state
of tool support outside Mac OS X is one of the worst. There is not
even a base plugin for Eclipse which otherwise has stuff like support
of haskell, Erlang etc. but not so for Objective-C so if that isn't a
poor state what else is?
Even the support in gdb is so crude. Printing an object needs some
po someObject and you do not even see the member elements. So please
do not tell that the state of Objective-C tools is a good one. It's
Yes. But it's all free software: you are free to modify and improve
them if they're in an unsatisfying state. You have to give some work.
The alternative is indeed to give some money to an enterprise such as
Apple Computer to have the job done for you.
There's no free lunch.
Actually, if the question is to develop OpenStep applications on
MS-Windows, since Apple Computer itself declines doing such a thing,
you'll have to find another enterprise to do it for you if you have
more money than time.
--
__Pascal Bourguignon__
>
> Yes. But it's all free software: you are free to modify and improve
> them if they're in an unsatisfying state. You have to give some
> work.
Sure they are free to waste my time.
>
> The alternative is indeed to give some money to an enterprise such as
> Apple Computer to have the job done for you.
That is what I liked to express. It's much cheaper and much more
satisfying.
>
> There's no free lunch.
Sure that's what I meant, you have to spend really years to get to
some point on make application programming pleasant on Windows. Of
course you can use the Win32 API, and just make the rest of your
program in to an Objective-C program. But you'll need tons of wrapper
to get some OO-feeling on Windows, and or the probably more
intelligent way would be implementing Objective-C on top of .NET. But
again than you are not MS and people are very unwillingly to pay for
development tools. At least that is what my impression is.
>
>
>
> Actually, if the question is to develop OpenStep applications on
> MS-Windows, since Apple Computer itself declines doing such a thing,
> you'll have to find another enterprise to do it for you if you have
> more money than time.
No Pascal this would be an enormmous time consuming undertaking. And
for what? Just that people will tell, why would anyone use such
"crude" syntax, and why not using C# or something else running on
.Net or heaven forbid, go write C(--) or was it ++ ;-)
But let's see who are the "players". There is MS which wants to get
everyone into writing for .NET. And they have implemented C# and
VisualBasic for .NET. So what incentive should be there for them to
implement an Objective-C. And well mac is based on OpenStep but
refused to make their tools available for developing Application
Software. I guess it's obvious why the do so. Imagine such
well-behaved and standardized Applications would run under
Windows. One can name Mac for so many things, but incongruent
application GUIS are not a part of it. But see what MS does to
you. Just see the difference between Office 2003 and 2007. Completly
different UIs, but then on the other hand it's one of the few tools
not having the "tradional" look and feel. I guess one has to search
long to find something like that on Mac OS X. Hell even OpenOffice
looks absolutly native on Mac OS X. But this is one real advantage
Macs do have and it's all programmable in C, Objective-C, Ruby, Python
and heaven knows what else.
Anyway I just stick to my opinion. The state of developers support on
Windows is near "non-existent". What you can use is some Unix wrapper
upon the Windos stuff, but that's not what I understand under a
pleasant development environment.
We mostly agree (I'm typing this on a Mac!).
I'll just mention a last consideration that may motivate the want of
developing in Objective-C and OpenStep on MS-Windows: marketshare.
Unfortunately, not all users and programmers are as discriminating as
we are, and a lot of them are still using MS-Windows.
Even if it is costly to develop or maintain an OpenStep development
environment on MS-Windows, it might be rewarding, considering the
volume of potential customers.
That said, I'd use MS-Windows only as a the target of a port for an
application already developed and debugged on MacOSX or on unix.
(And also unfortunately, the offer in flight simulators and related
devices is also greater on MS-Windows, so I might buy a MS-Windows box
just for that, but if flight simulator developers ported to Mac, and
if gadgets producers would at least publish their hardware
documentation, I'd do without MS-Windows).
--
__Pascal Bourguignon__
> Greetings to everyone!
>
> Maybe this is just a very silly question please forgive me anyway...
>
>
> Can I code with ObjC under Windows platform,and/or making use of all
> coca's features?
Your options are limited. One of the options is Cocoatron:
"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."
Perhaps somebody should tell them about GNUstep?
--
__Pascal Bourguignon__
Different goals .. see
http://macdaddyworld.com/2008/10/27/adventures-in-cocotron/ for what
you can do with Cocotron.
S.
Ah, yes, sounds nice. Cross compiling from Xcode! Great!
--
__Pascal Bourguignon__
Thank you so much.I learnt from the website that the cocotron have to
be build under a Mac machine.Is this true?
Regards,
Sam
Yes that's true. This is why I simply suggested get some Mac install
the development tools and start programming Objective-C in a friendly
surrounding which surely is supported from Apple.
How about something like this for Windows and Linux?
You can use any good editor as your IDE like Geany which runs on both
OSes.
Use GTK+ 2.x as your cross-platform GUI.
Use Glade as your GUI Builder and libGlade to implement the XML GUI
definition file --or-- if you would like to write your own GUI code
using an Objective-C gui lib... try something like this:
/**************************************************/
/******** Objective-C Wrapper for GTK+ 2.x ********/
/**************************************************/
/******** T E S T ********/
/**************************************************/
#import "og_interface.h"
/******** program section ********/
static void destroy(GtkWidget*, gpointer);
static void onclick_button2(GtkWidget*, gpointer);
int main (int argc, gchar *argv[])
{
// Define the GTK classes
ogWindow *myWindow;
ogHBox *myHBox;
ogButton *myButton1;
ogButton *myButton2;
// Must initialize GTK
ogINIT;
// Allocate and initialize the main window
myWindow = [[ogWindow alloc] initType: wtTOPLEVEL];
[myWindow setTitle: "Objective-C Wrapper for GTK+ 2.x"];
[myWindow setContainBorder: 25];
[myWindow setResize: FALSE];
[myWindow setWidth: 400 setHeight: 100];
[myWindow setPosition: wpCENTER];
// Define the event/signal for the main window
[myWindow evSignal: onDestroy Callback: destroy Parent: NULL];
// Allocate and initialize a horizontal box
myHBox = [[ogHBox alloc] initEqSpace: FALSE Spacing: 0];
[myHBox addContainer: [myWindow getID]];
// Allocate and initialize the 1st button
myButton1 = [[ogButton alloc] initMnemonic: "_Close"];
[myButton1 packStart: [myHBox getID] Expand: TRUE Fill: TRUE
Padding: 0];
// Define the event/signal for the 1st button
[myButton1 evSignal: onClick Callback: gtk_widget_destroy Parent:
[myWindow getID]];
// Allocate and initialize the 2nd button
myButton2 = [[ogButton alloc] initStock: siDLGINFO];
[myButton2 packStart: [myHBox getID] Expand: TRUE Fill: TRUE
Padding: 0];
// Define the event/signal for the 2nd button
[myButton2 evSignal: onClick Callback: onclick_button2 Parent:
[myWindow getID]];
// Show all widgets
[myWindow setShow: wsALL];
// Main GTK loop
ogLOOP;
// Sample MsgBox
MsgBox(NULL, mfPARENT, mtWARNING, mbCLOSE, "Goodbye World");
// Free all allocated classes
[myButton1 free];
[myButton2 free];
[myHBox free];
[myWindow free];
return 0;
}
/* Stop the GTK+ main loop function. */
static void destroy (GtkWidget *window, gpointer data)
{
// Quit GTK
ogQUIT;
}
static void onclick_button2(GtkWidget* window, gpointer data)
{
// Sample MsgBox
MsgBox(window, mfPARENT, mtINFO, mbCLOSE, "Hello World");
}
Cocoa is the hardware limiter.
For example, the IPhone SDK, needs 10.5.4 (I believe). That needs to run
on Intel hardware. So, either an Intel Mac or a Hackintosh. Google will
give you more info.
Jeff