public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Compiling Objective-C Using Cygwin
@ 2013-05-02 18:20 Eric Kessler
  2013-05-02 18:38 ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Kessler @ 2013-05-02 18:20 UTC (permalink / raw)
  To: cygwin

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.  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?


--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compiling Objective-C Using Cygwin
  2013-05-02 18:20 Compiling Objective-C Using Cygwin Eric Kessler
@ 2013-05-02 18:38 ` Larry Hall (Cygwin)
  2013-05-02 19:15   ` Eric Kessler
  0 siblings, 1 reply; 8+ messages in thread
From: Larry Hall (Cygwin) @ 2013-05-02 18:38 UTC (permalink / raw)
  To: 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compiling Objective-C Using Cygwin
  2013-05-02 18:38 ` Larry Hall (Cygwin)
@ 2013-05-02 19:15   ` Eric Kessler
  2013-05-02 19:39     ` marco atzeri
  2013-05-02 19:42     ` Larry Hall (Cygwin)
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Kessler @ 2013-05-02 19:15 UTC (permalink / raw)
  To: cygwin

Larry Hall (Cygwin <reply-to-list-only-lh <at> cygwin.com> writes:

> 
> You can't do this.  Cygwin != Linux!
> 
Of course!  I'll delete those files and get the Windows files.
> 
> <http://cygwin.com/cgi-bin2/package-cat.cgi?file=gcc4-objc%2Fgcc4-objc-
4.5.3-3&grep=cc1obj>
> 
> Install gcc4-objc.
> 


Thanks!  But that page doesn't have any hyperlinks on it; it's just a list 
of files.  What location do I get them from?


--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compiling Objective-C Using Cygwin
  2013-05-02 19:15   ` Eric Kessler
@ 2013-05-02 19:39     ` marco atzeri
  2013-05-02 19:42     ` Larry Hall (Cygwin)
  1 sibling, 0 replies; 8+ messages in thread
From: marco atzeri @ 2013-05-02 19:39 UTC (permalink / raw)
  To: cygwin

Il 5/2/2013 8:14 PM, Eric Kessler ha scritto:
> Larry Hall (Cygwin <reply-to-list-only-lh <at> cygwin.com> writes:
>
>>
>> You can't do this.  Cygwin != Linux!
>>
> Of course!  I'll delete those files and get the Windows files.
>>
>> <http://cygwin.com/cgi-bin2/package-cat.cgi?file=gcc4-objc%2Fgcc4-objc-
> 4.5.3-3&grep=cc1obj>
>>
>> Install gcc4-objc.
>>
>
>
> Thanks!  But that page doesn't have any hyperlinks on it; it's just a list
> of files.  What location do I get them from?

As every other cygwin package: from setup.exe .

you need to install the "gcc4-objc" package


Regard
Marco


--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compiling Objective-C Using Cygwin
  2013-05-02 19:15   ` Eric Kessler
  2013-05-02 19:39     ` marco atzeri
@ 2013-05-02 19:42     ` Larry Hall (Cygwin)
  2013-05-02 19:44       ` Larry Hall (Cygwin)
  2013-05-02 20:02       ` Eric Kessler
  1 sibling, 2 replies; 8+ messages in thread
From: Larry Hall (Cygwin) @ 2013-05-02 19:42 UTC (permalink / raw)
  To: cygwin

On 5/2/2013 3:14 PM, Eric Kessler wrote:
> Larry Hall (Cygwin <reply-to-list-only-lh <at> cygwin.com> writes:
>
>>
>> You can't do this.  Cygwin != Linux!
>>
> Of course!  I'll delete those files and get the Windows files.
>>
>> <http://cygwin.com/cgi-bin2/package-cat.cgi?file=gcc4-objc%2Fgcc4-objc-
> 4.5.3-3&grep=cc1obj>
>>
>> Install gcc4-objc.
>>
>
>
> Thanks!  But that page doesn't have any hyperlinks on it; it's just a list
> of files.  What location do I get them from?

That page is generated from <http://cygwin.com/packages/> by entering
"cc1obj".  It tells you the packages contain the string you searched
for.  So the package you want to install is 'gcc4-objc'.  How do you
do that you ask?  Use 'setup.exe', just like you did when you installed
Cygwin packages the first (and any subsequent) time(s).  See
<http://cygwin.com/setup.exe>


-- 
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compiling Objective-C Using Cygwin
  2013-05-02 19:42     ` Larry Hall (Cygwin)
@ 2013-05-02 19:44       ` Larry Hall (Cygwin)
  2013-05-02 20:02       ` Eric Kessler
  1 sibling, 0 replies; 8+ messages in thread
From: Larry Hall (Cygwin) @ 2013-05-02 19:44 UTC (permalink / raw)
  To: cygwin

On 5/2/2013 3:42 PM, Larry Hall (Cygwin) wrote:
<snip>
> That page is generated from <http://cygwin.com/packages/> by entering
> "cc1obj".  It tells you the packages contain the string you searched
                                               ^
                                               ing
> for.  So the package you want to install is 'gcc4-objc'.  How do you
> do that you ask?  Use 'setup.exe', just like you did when you installed
> Cygwin packages the first (and any subsequent) time(s).  See
> <http://cygwin.com/setup.exe>
>
>


-- 
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compiling Objective-C Using Cygwin
  2013-05-02 19:42     ` Larry Hall (Cygwin)
  2013-05-02 19:44       ` Larry Hall (Cygwin)
@ 2013-05-02 20:02       ` Eric Kessler
  2013-05-02 20:06         ` Larry Hall (Cygwin)
  1 sibling, 1 reply; 8+ messages in thread
From: Eric Kessler @ 2013-05-02 20:02 UTC (permalink / raw)
  To: cygwin

Thanks! That did it.

I found the package under the category Devel.  There are so many packages 
and categories, I didn't know which ones to include and where to look for 
them.  The installer does have a dependency checker, but it doesn't seem  
to catch all the dependencies.


--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Compiling Objective-C Using Cygwin
  2013-05-02 20:02       ` Eric Kessler
@ 2013-05-02 20:06         ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 8+ messages in thread
From: Larry Hall (Cygwin) @ 2013-05-02 20:06 UTC (permalink / raw)
  To: cygwin

On 5/2/2013 4:01 PM, Eric Kessler wrote:
> Thanks! That did it.
>
> I found the package under the category Devel.  There are so many packages
> and categories, I didn't know which ones to include and where to look for
> them.  The installer does have a dependency checker, but it doesn't seem
> to catch all the dependencies.

Categories are a good way to look at things if you know the general area
but not the specific.  If you know the package you're looking for, the
full list or simply using the search box is the most helpful.  As far as
dependencies are concerned, if the dependency is set up, then selecting a
package will pull in those dependencies, barring some bug.  For Objective-C,
that's really at the top of the dependency chain so you'd have to select it
to get it.

-- 
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-02 20:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 18:20 Compiling Objective-C Using Cygwin Eric Kessler
2013-05-02 18:38 ` Larry Hall (Cygwin)
2013-05-02 19:15   ` Eric Kessler
2013-05-02 19:39     ` marco atzeri
2013-05-02 19:42     ` Larry Hall (Cygwin)
2013-05-02 19:44       ` Larry Hall (Cygwin)
2013-05-02 20:02       ` Eric Kessler
2013-05-02 20:06         ` Larry Hall (Cygwin)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).