Path: utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: auspex!guy@uunet.uu.net (Guy Harris) Newsgroups: comp.sys.sun Subject: "dlsym" issue (was Re: Sun-Spots Digest, v10n86 [Miscellaneous]) Keywords: Miscellaneous Message-ID: <3795@brchh104.bnr.ca> Date: 12 Jun 91 19:40:00 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 22 Approved: Sun-Spots@rice.edu X-Original-Date: 6 Jun 91 00:20:22 GMT X-Sun-Spots-Digest: Volume 10, Issue 106, message 15 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu > myloadedfunc1 = dlsym(libhandle, "_func1"); BTW, if the name of the function that you're trying to get a pointer to is "func1", pass "func1", *not* "_func1", to "dlsym()". Both may *work* in SunOS 4.1; however, not *all* systems with "dlsym()" have compilers that prepend underscores to symbol names, and I don't know if the "dlsym()" on any of those System V Release 4 systems will be "polite" enough to find "func1" if asked for "_func1". I.e., dlsym(libhandle, "func1") should find the function whose name, in the C source code that defines it, is "func1", both in SunOS 4.1 and System V Release 4; however, while dlsym(libhandle, "_func1") will find it in SunOS 4.1, it may not find it in System V Release 4, so the former, as it may work on more systems, is preferable to the latter.