Overview
| Artifact ID: | 68373a0c502c751d15e1fa61cfb3e7193328fff5 |
|---|---|
| Ticket: | 1224888fffffffffffffffffffffffffffffffff
possible to have an empty info nameofexecutable |
| User & Date: | dkf on 2011-10-13 17:54:23 |
Changes
- icomment:
I also like the dladdr() solution, though the name it yields is not necessarily normalized. Still, that's a practical solution (and would be easy to check for with autoconf). My little test code: #include <dlfcn.h> #include <stdio.h> int main(int argc,char**argv) { Dl_info info; if (!dladdr(main,&info)) { printf("not found\n"); return 1; } printf("\"%s\"\n",info.dli_fname); return 0; } - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"