
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
Hi!
I have long time hesitated to ask (and the problem is since long time
solved), but I still don't understand the error ... The error being that
calls from external libraries appears to (unwarantly) link with my code.
Given the two following (symbolic) references
--begin-file.A.c--
/* file A, includes various systemdependent stuff that must be initiated
before doing anything else ... */
#include <unistd.h> // there is a function called 'unlink' defined here!
// the semantics is: 'delete file'
// init this ...
// ... and that as well ...
int main(void){ // ...
--eof-file A.c--
/* file B
--begin-file.B.c--
//...
// No external headers here but ...
// We have part of a locally linked list
(blah) unlink(blah) {/* blah, blah */}; /*unlink exist also in 'unistd.h' */
// ... whatever 'unlink' means,it is definately a defined symbol here.
// Problem: What does 'unlink' mean now???
--eof-file-B.c--
My code also linked to a _third_ library, which insisted on dropping a
file for each unknown glyph encounterd. ('unlink' was somehow disabled)
The problem disappeared with the use of 'static unlink()'
--------------------
Question: Why/Or is it correct that the linker replaces
librarycalls to libraryfunctions
with
librarycalls to userdefined functions
-------------------------
dazed and confused // Jens M Andreasen
--
comp.lang.c.moderated - moderation address: [EMAIL PROTECTED]
| <-- __Chronological__ --> | <-- __Thread__ --> |