public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: benbondu@netscape.net
To: gcc-help@gcc.gnu.org
Subject: newbie of Obj-C
Date: Fri, 28 Jun 2002 23:48:00 -0000	[thread overview]
Message-ID: <08198764.5879E77E.00935929@netscape.net> (raw)

I'm trying to learn Objective-C but can't seem to get a simple program to compile.  I copied it from a college web site so I assume it's written correctly.  After compiling each implementation file like this:

gcc -c -Wno-import (.m file)


I then try to link all of the implementations like this:

gcc -Wno-import (.o files) -lobjc


but instead of an a.out I get this:


/usr/lib/gcc-lib/i386-linux/2.95.2/libobjc.a(thr-posix.o): In function `__objc_init_thread_system':
thr-posix.o(.text+0x41): undefined reference to `pthread_key_create'
/usr/lib/gcc-lib/i386-linux/2.95.2/libobjc.a(thr-posix.o): In function `__objc_thread_detach':
thr-posix.o(.text+0x79): undefined reference to `pthread_create'
/usr/lib/gcc-lib/i386-linux/2.95.2/libobjc.a(thr-posix.o): In function `__objc_thread_set_data':
thr-posix.o(.text+0x128): undefined reference to `pthread_setspecific'
/usr/lib/gcc-lib/i386-linux/2.95.2/libobjc.a(thr-posix.o): In function `__objc_thread_get_data':
thr-posix.o(.text+0x148): undefined reference to `pthread_getspecific'
/usr/lib/gcc-lib/i386-linux/2.95.2/libobjc.a(thr-posix.o): In function `__objc_mutex_trylock':
thr-posix.o(.text+0x235): undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status


Now I've done some simple C and C++ programming on this machine before (no problem compiling them) but I have no idea what these errors are about.  I'm running Debian 2.2R6 and installed the Objective-C development packages but I suspect I still may not have everything set up right.  Much appreciation for anyone who can guide me in the right direction toward getting this to work.  Thanks

Ben



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

             reply	other threads:[~2002-06-29  6:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-28 23:48 benbondu [this message]
2002-06-29  5:15 ` bjorn rohde jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=08198764.5879E77E.00935929@netscape.net \
    --to=benbondu@netscape.net \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).