Article View: gnu.gcc.help
Article #42771linking error HELP
From: Michael Macon
Date: Thu, 19 Oct 1995 00:00
Date: Thu, 19 Oct 1995 00:00
34 lines
1809 bytes
1809 bytes
Hi, I have looked through a few FAQs and asked "resident experts", but I have not been able to solve this problem: I am trying to compile some C software for a project I am working on. It consists of a mix of *.a libraries, objects, and c src. I don't have access to the src that was used to create some of the libraries. I am using gcc version 2.6.3 to compile on a Sparc10 running SunOS version 4.1.3. The c src compiles OK, but when ld tries to do the linking, I get ld: Undefined symbol _fgetpos _fsetpos These are functions that appear in my ANSI C book, and they also appear in the gnu "stdio.h", but I can't find the symbols in any of the *.a libraries on our system (I looked using 'nm *.a | grep ...'). It appears that these 2 functions are called from within the other libraries in the project for which I have no source code, so I can't just use different functions like "ftell" and "fseek". Has anyone ever run into this problem? The only solutions I can think of are (1) to locate libraries that DO have these symbols, or (2) to write dummy fgetpos and fsetpos functions that actually use fseek and ftell to do the work, and link these. (I would have to make intelligent guesses at the prototypes then.) Any help would be appreciated. Thanks. M. Macon
Technical Details
Message-ID:
<465r2t$6s@hardy.ee.gatech.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,ff80bdf1851f7715,start X-Google-Attributes: gid11318c,public From: Michael Macon <macon> Subject: linking error HELP Date: 1995/10/19 Message-ID: <465r2t$6s@hardy.ee.gatech.edu> X-Deja-AN: 117898356 content-type: text/plain; charset=us-ascii organization: Georgia Institute of Technology x-url: news:gnu.gcc.help mime-version: 1.0 newsgroups: gnu.gcc.help x-mailer: Mozilla 1.1N (X11; I; SunOS 4.1.3 sun4m)