From owner-freebsd-questions@FreeBSD.ORG Mon Nov 14 00:44:54 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A562F16A41F for ; Mon, 14 Nov 2005 00:44:54 +0000 (GMT) (envelope-from margent@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40F4843D53 for ; Mon, 14 Nov 2005 00:44:54 +0000 (GMT) (envelope-from margent@gmail.com) Received: by xproxy.gmail.com with SMTP id t10so1522420wxc for ; Sun, 13 Nov 2005 16:44:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bL0H8lUwP+55GTGcJ6QWvQLCpGvGok9xCCAANtkLTAI0nwU8emJhVAulrSL/qUwp1pEBC8lFTFXJpZuvUwleYLJV24VZK6GWJyg2/UmLAWkuYxLTKFiAkTUni87+4QcOGbVQJzHbaFR3Ekc8LqNhAltM6uBdgjpvz3xcAJ3AHCQ= Received: by 10.65.158.6 with SMTP id k6mr2173772qbo; Sun, 13 Nov 2005 16:44:53 -0800 (PST) Received: by 10.65.160.2 with HTTP; Sun, 13 Nov 2005 16:44:53 -0800 (PST) Message-ID: <4d6854f30511131644p52847154o@mail.gmail.com> Date: Mon, 14 Nov 2005 00:44:53 +0000 From: Marc Argent To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: FreeBSD 6.0 and Objective C X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2005 00:44:54 -0000 Hi, I am trying to compile a very simple Objective C program (actually, it is a 'Hello World' test program with a different file extension and linked to the Objective C library). #import int main (int argc, const char *argv[]) { =09printf("Hello World\n"); =09return 0; } I am invoking the compiler with the following line: gcc main.m -o helloworld -l objc This results in the following error message: /usr/lib/libobjc.so: undefined reference to `pthread_attr_destroy' /usr/lib/libobjc.so: undefined reference to `pthread_create' /usr/lib/libobjc.so: undefined reference to `pthread_attr_init' /usr/lib/libobjc.so: undefined reference to `pthread_exit' /usr/lib/libobjc.so: undefined reference to `pthread_getschedparam' /usr/lib/libobjc.so: undefined reference to `pthread_setschedparam' /usr/lib/libobjc.so: undefined reference to `pthread_attr_setdetachstate' I get the same error message from a vanilla install of FreeBSD 6.0 and one that has been updated with all security updates as of Friday (11/11/2005). I realise that security updates wouldn't fix this, but thought it worth mentioning. Compiling the code without the "-l objc" flag works just fine. Any idea what is up? I will try updating my other machine to the latest and greatest sources tomorrow and see if that fixes it. Regards Marc