This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling Objective-C Using Cygwin


On 5/2/2013 2:00 PM, Eric Kessler wrote:
I am trying to learn Objective-C using Cygwin.

First I wrote a hello world program in C and compiled it thus:

gcc -o inventry inventry.c

and it worked perfectly.

Then I renamed the source file inventory.m, and since every C program
should be a valid Objective-C program, compiled it thus:

gcc -o inventry inventry.m -lobjc

and got the following error:

gcc: error trying to exec 'cc1obj': execvp: No such file or directory

I did a web search of that error message, and found that I needed to
install gobjc.  I could not find gobjc on the installer package from the
mirror site from which I had originally installed cygwin, so I got it from
a site called "ubuntu" and installed it.

You can't do this.  Cygwin != Linux!

Now I get the following error:

gcc: error trying to exec '/usr/lib/gcc/i686-pc-cygwin/4.5.3/cc1obj':
execv: Exec format error

I did a web search of that error, and found something that said that
cygwin was not installed properly and needs to be reinstalled.  I assume
that means that the version of gobjc that I installed from "ubuntu" was
not compatible with my cygwin installation.

So how do I get gobjc from the standard installer package?  I don't see it
listed in the list of packages to install?

<http://cygwin.com/cgi-bin2/package-cat.cgi?file=gcc4-objc%2Fgcc4-objc-4.5.3-3&grep=cc1obj>

Install gcc4-objc.


--
Larry

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]