Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get started

17 views
Skip to first unread message

Lorenzo Thurman

unread,
Jan 31, 2007, 11:27:12 AM1/31/07
to
I'm building gcc with objc and objc++ support as I write this, but will
I need anything more to develop network ObjC apps? I have some
experience with ObjC with Macs, but developing under linux is new to me.
TIA

David Given

unread,
Jan 31, 2007, 12:25:13 PM1/31/07
to

I don't believe that gcc comes with much in the way of libraries other than
just the runtime. You'll probably need to install the libfoundation
development kit. (libfoundation-dev in Debian; that'll pull in the compiler
too. You are aware that pretty much every distro comes with a prebuilt
Objective C compiler, right? You don't need to rebuild gcc if you don't want to.)

libfoundation gives you an OpenStep implementation:

http://www.gnustep.org/resources/documentation/Developer/Base/Reference/Base.html

There appears to be some networking classes in there.

--
┌── dg@cowlark.com ─── http://www.cowlark.com ───────────────────

│ "May you be blessed by His Noodly Appendage!"

Lorenzo Thurman

unread,
Jan 31, 2007, 2:02:51 PM1/31/07
to
David Given wrote:
> Lorenzo Thurman wrote:
>> I'm building gcc with objc and objc++ support as I write this, but will
>> I need anything more to develop network ObjC apps? I have some
>> experience with ObjC with Macs, but developing under linux is new to me.
>
> I don't believe that gcc comes with much in the way of libraries other than
> just the runtime. You'll probably need to install the libfoundation
> development kit. (libfoundation-dev in Debian; that'll pull in the compiler
> too. You are aware that pretty much every distro comes with a prebuilt
> Objective C compiler, right? You don't need to rebuild gcc if you don't want to.)
>
No, I did not. I thought I needed to add support to gcc. How can I
invoke the ObjC compiler? Are there any benefits to it over gcc?

> libfoundation gives you an OpenStep implementation:
>
> http://www.gnustep.org/resources/documentation/Developer/Base/Reference/Base.html
>
> There appears to be some networking classes in there.
>

Thanks, much appreciated.

Graham J Lee

unread,
Feb 1, 2007, 3:08:46 AM2/1/07
to
On 31/1/07 19:02, Lorenzo Thurman wrote:
> David Given wrote:
>> Lorenzo Thurman wrote:
>>> I'm building gcc with objc and objc++ support as I write this, but
>>> will I need anything more to develop network ObjC apps? I have some
>>> experience with ObjC with Macs, but developing under linux is new to me.
>>
>> I don't believe that gcc comes with much in the way of libraries other
>> than
>> just the runtime. You'll probably need to install the libfoundation
>> development kit. (libfoundation-dev in Debian; that'll pull in the
>> compiler
>> too. You are aware that pretty much every distro comes with a prebuilt
>> Objective C compiler, right? You don't need to rebuild gcc if you
>> don't want to.)
>>
> No, I did not. I thought I needed to add support to gcc. How can I
> invoke the ObjC compiler? Are there any benefits to it over gcc?
>

Usually a Linux distro will have a package called gcc-objc or something
similar, which contains the Objective-C support for gcc. gcc is *the*
Objective-C compiler, so no other has any benefits over it ;-)

>> libfoundation gives you an OpenStep implementation:
>>
>> http://www.gnustep.org/resources/documentation/Developer/Base/Reference/Base.html
>>
>> There appears to be some networking classes in there.
>>
> Thanks, much appreciated.

Yup, gnustep-base or libfoundation are pretty good places to start (I'd
recommend gnustep-base, as it has more users and is very stable and
mature, but I'm also a gnustep maintainer so I may be biased). Once
you've got one of those installed, take a look at netclasses
http://netclasses.aeruder.net which is a very convenient way of setting
up asynchronous network connections ;-)

--
Graham Lee
http://www.thaesofereode.info

Graham J Lee

unread,
Feb 1, 2007, 3:40:46 AM2/1/07
to
On 1/2/07 08:08, Graham J Lee wrote:
> mature, but I'm also a gnustep maintainer
sorry, I spell "committer" in a strange dialect.

David Given

unread,
Feb 1, 2007, 5:47:42 AM2/1/07
to
Graham J Lee wrote:
> On 31/1/07 19:02, Lorenzo Thurman wrote:
[...]

>> No, I did not. I thought I needed to add support to gcc. How can I
>> invoke the ObjC compiler? Are there any benefits to it over gcc?
>
> Usually a Linux distro will have a package called gcc-objc or something
> similar, which contains the Objective-C support for gcc. gcc is *the*
> Objective-C compiler, so no other has any benefits over it ;-)

Debian provides gobjc and gobjc++ packages, which pull in ObjC and ObjC++ via
gcc (default version is 4.1.1 on my system, but you can pick and choose).
However, if you install any ObjC development package (such as
libgnustep-base-dev), it'll automatically install gobjc for you.

[...]


> Yup, gnustep-base or libfoundation are pretty good places to start (I'd
> recommend gnustep-base, as it has more users and is very stable and
> mature, but I'm also a gnustep maintainer so I may be biased).

That's what I get for not following through on the documentation --- I thought
GNUstep *used* libfoundation...

Graham J Lee

unread,
Feb 1, 2007, 6:06:32 AM2/1/07
to
On 1/2/07 10:47, David Given wrote:

> Graham J Lee wrote:
>
> [...]
>> Yup, gnustep-base or libfoundation are pretty good places to start (I'd
>> recommend gnustep-base, as it has more users and is very stable and
>> mature, but I'm also a gnustep maintainer so I may be biased).
>
> That's what I get for not following through on the documentation --- I thought
> GNUstep *used* libfoundation...
>

:-) There are multiple libFoundation projects, of which two I think are
active...there's one which was started by OpenDarwin and AFAIK has
little implementation of the Foundation library yet. The other is a
fork of gnustep-base which was developed by Skyrix and is part of
OpenGroupware.org.

Lorenzo Thurman

unread,
Feb 1, 2007, 5:49:54 PM2/1/07
to
Thanks for all the replies. I think I have a distro problem though. I'm
running on Gentoo (please, let it go) and they do have packages
available for GNUStep, and I've installed them, but I think the
installer neglects to set the lib and header paths. I can find the
headers on the filesystem at /usr/GNUstep/.../Headers. It looks
complete, but gcc can't find them. I've already dropped a line on the
Gentoo forums, but I've heard nothing back.

Sherm Pendley

unread,
Feb 1, 2007, 6:19:11 PM2/1/07
to
Lorenzo Thurman <lor...@diespammerhethurmans.com> writes:

> Thanks for all the replies. I think I have a distro problem
> though. I'm running on Gentoo (please, let it go) and they do have
> packages available for GNUStep, and I've installed them, but I think
> the installer neglects to set the lib and header paths. I can find the
> headers on the filesystem at /usr/GNUstep/.../Headers. It looks
> complete, but gcc can't find them. I've already dropped a line on the
> Gentoo forums, but I've heard nothing back.

Have you sourced the required startup scripts in your shell environment?

Mentioned here, at the bottom of the page:

<http://www.gnustep.org/resources/documentation/Developer/Base/ProgrammingManual/manual_1.html#SEC11>

AKA <http://tinyurl.com/26zgdp>

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Lorenzo Thurman

unread,
Feb 3, 2007, 12:13:34 AM2/3/07
to
Sherm Pendley wrote:
> Lorenzo Thurman <lor...@diespammerhethurmans.com> writes:
>
>> Thanks for all the replies. I think I have a distro problem
>> though. I'm running on Gentoo (please, let it go) and they do have
>> packages available for GNUStep, and I've installed them, but I think
>> the installer neglects to set the lib and header paths. I can find the
>> headers on the filesystem at /usr/GNUstep/.../Headers. It looks
>> complete, but gcc can't find them. I've already dropped a line on the
>> Gentoo forums, but I've heard nothing back.
>
> Have you sourced the required startup scripts in your shell environment?
>
> Mentioned here, at the bottom of the page:
>
> <http://www.gnustep.org/resources/documentation/Developer/Base/ProgrammingManual/manual_1.html#SEC11>
>
> AKA <http://tinyurl.com/26zgdp>
>
> sherm--
>
Yes, I finally figured it out, mostly. I wasn't using proper makefiles.
That got me going to a point. I'm trying to compile the simple program here:
http://www.gnustep.org/resources/documentation/Developer/Base/ProgrammingManual/manual_1.html#SEC11

but linking fails with this error:

Making all for tool test...
Linking tool test ...
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crt1.o: In function `_start':
init.c:(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
make[1]: *** [shared_obj/test] Error 1
make: *** [test.all.tool.variables] Error 2

Sherm Pendley

unread,
Feb 3, 2007, 2:47:40 AM2/3/07
to
Lorenzo Thurman <lor...@diespammerhethurmans.com> writes:

> I'm trying to compile the
> simple program here:
> http://www.gnustep.org/resources/documentation/Developer/Base/ProgrammingManual/manual_1.html#SEC11
>
> but linking fails with this error:
>
> Making all for tool test...
> Linking tool test ...
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crt1.o: In function `_start':
> init.c:(.text+0x18): undefined reference to `main'

Well, the meaning of the error is pretty obvious - the linker isn't finding
the main() function that's at the bottom of the example.

As to why that may be, I'd look for typos - maybe you misnamed the function
or something like that. It can't be something *too* horrible, else you would
have gotten a compiler error instead of a linker error.

If you can't find the typo, post your code - copy & paste it, don't try to
retype it. As the saying goes, with enough eyes all bugs are shallow.

Lorenzo Thurman

unread,
Feb 3, 2007, 10:25:31 AM2/3/07
to
Sherm Pendley wrote:
> Lorenzo Thurman <lor...@diespammerhethurmans.com> writes:
>
>> I'm trying to compile the
>> simple program here:
>> http://www.gnustep.org/resources/documentation/Developer/Base/ProgrammingManual/manual_1.html#SEC11
>>
>> but linking fails with this error:
>>
>> Making all for tool test...
>> Linking tool test ...
>> /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crt1.o: In function `_start':
>> init.c:(.text+0x18): undefined reference to `main'
>
> Well, the meaning of the error is pretty obvious - the linker isn't finding
> the main() function that's at the bottom of the example.
>
> As to why that may be, I'd look for typos - maybe you misnamed the function
> or something like that. It can't be something *too* horrible, else you would
> have gotten a compiler error instead of a linker error.
>
> If you can't find the typo, post your code - copy & paste it, don't try to
> retype it. As the saying goes, with enough eyes all bugs are shallow.
>
> sherm--
>
I got it working now. There were a couple of typos in both the
GNUmakefile and my source. All is well now, thanks for the help.

Jeff Teunissen

unread,
Feb 3, 2007, 12:02:27 PM2/3/07
to
Graham J Lee wrote:

The former OpenDarwin branch (now known as "Substrate") is a fork of the
original libFoundation, which is not (and to my knowledge, never has been) a
fork of the GNUstep Base library. The original libFoundation was written by
Helge Hess, Mircea Oancea, and Ovidiu Predescu, and I don't know if it even
contains GNUstep code.

helge...@googlemail.com

unread,
Jul 12, 2018, 4:55:06 PM7/12/18
to
That is right, libFoundation is not a fork of GNUstep Base, they've been developed in parallel. libFoundation was started my Ovidiu and Mircea and I added a few things later on. (the stuff used in Skyrix/OpenGroupware is libFoundation, not gnustep-base, though we later switched to gnustep-base for SOGo).

P.S.: That is a late reply, isn't it? ;-)
0 new messages