1. static functions in library matching global functions
I have a peculiar problem which I'm sure you gurus can answer.
I've created a full-blown Motif widget for Solaris 2.5.1 and I've compiled
it into a dynamic shared library so that I can use it in multiple programs.
The problem is, however, that some of the static functions in the library
have the same names as public functions in the application that uses the
library, and at runtime the library calls the global functions instead of
its own static functions!
I thought that static stuff were renamed so that it would not be accessible
nor possibly match other functions. If, for instance, a static variables in
two object modules have the same name, how do the compiler know which one to
use, and when? But if functions are renamed, how come the application
manages to call the wrong functions?
Is the behavior perhaps different when compiling a library (I'm using cc
4.2)? Is there a switch I can use to make the library call the correct
static functions?
Please help, as I don't know how to solve this problem (other than the
obvious; renaming the functions, of course (which is not a good solution
since I can never be 100% sure whether some other program has global
functions with the same names...).
--
Ketil Hunn
2. NEC CDR-273 CD-ROM problems w/ Slackware v1.2.3
3. Nawk matching "):" -- Can it be done?
4. Would Linux run well on my system?
5. nawk functions
6. Anyone Using Powerlink?
7. two simple nawk questions, Sunos 4.1.2 and nawk
8. symbol for io...
9. nawk (gawk) user defined functions question
10. nawk builtin `system' function
11. Calling a sh function from a nawk script.
12. pattern match&search&edit for a text file
13. Traffic Shaping & signature match & conntrack