From owner-freebsd-questions Fri May 22 05:28:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA10471 for freebsd-questions-outgoing; Fri, 22 May 1998 05:28:18 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from post.mail.demon.net (post-12.mail.demon.net [194.217.242.41]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id FAA10460 for ; Fri, 22 May 1998 05:28:09 -0700 (PDT) (envelope-from marko@uk.radan.com) Received: from (uk.radan.com) [158.152.75.22] by post.mail.demon.net with smtp (Exim 1.82 #2) id 0ycqvW-0002EI-00; Fri, 22 May 1998 13:27:59 +0100 Organisation: Radan Computational Ltd., Bath, UK. Phone: +44-1225-320320 Fax: +44-1225-320311 Received: from beavis.uk.radan.com (beavis [193.114.228.122]) by uk.radan.com (8.6.10/8.6.10) with SMTP id NAA02585 for ; Fri, 22 May 1998 13:27:18 +0100 Received: from uk.radan.com (gppsun4) by beavis.uk.radan.com (4.1/SMI-4.1) id AA08649; Fri, 22 May 98 13:27:17 BST Message-Id: <35656F1C.C4A9A6BE@uk.radan.com> Date: Fri, 22 May 1998 13:27:08 +0100 From: Mark Ovens Organization: Radan Computational Ltd X-Mailer: Mozilla 4.03 [en] (X11; I; SunOS 4.1.3_U1 sun4m) Mime-Version: 1.0 To: questions@FreeBSD.ORG Subject: gcc linker problems Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I'm having a few problems (static) linking some programs with gcc. The program comes from a Sun4.x and I've got everything to compile OK but get errors when linking. The compiling/linking is run from scripts which produce the following: cc file1.o file2.o -lrad The errors (100's of them!) are of the form: file1.o: undefined symbol '_sys_get_status' referenced in text segment In all cases the symbols are defined in librad.a (confirmed with nm) and are declared extern in the source (in the header files). I guess this is just a case of the options to cc being different for gcc than for the Sun (Sparcworks C compiler v3.0.1), which was all I had to modify to compile the source, but I can't work out what needs changing for the linker. I'm not looking for a definitive to solution to this specific case just some pointers (no pun intended) to the correct options to use (I would have to trawl through the scripts to work out exactly what options are currently being used). Thanks. -- Mark Ovens *====================================* CNC Apps Engineer | One of the main causes of the fall | Radan Computational Ltd | of the Roman Empire was, that | mailto:marko@uk.radan.com | lacking a zero, they had no way of | | indicating the successful | | termination of their C programs | *====================================* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message