Re: static libs imported into DSO?

2003-01-13 Thread Kent Watsen
I've doublechecked this. Other than the not passing RTLD_LAZY, this really does work using gcc on OpenBSD, but not with Cygwin. Does the shared library itself have to be a DSO? I thought plugins could share code with the base app that loads them into memory? Kent Watsen wrote: Hi al

static libs imported into DSO?

2003-01-12 Thread Kent Watsen
Hi all, I have simple application that I want to link a plugin into. The intent is for the plugin the use the same libraries linked into the main app, but instead the plugin is linking in its own copy! This code works as expected using gcc on OpenBSD. What am I doing wrong? Can I tell the linker

Re: dlopen(0, RTLD_LAZY) doesn't work?

2002-02-08 Thread Kent Watsen
ul\n"); >> >>dlclose(dl); >>return 0; >> } >> >> and compiling with first: >> gcc -mdll foo.c -c -o ... >> then linking without -mdll: >> gcc foo.o ... -o foo >> >> >> Note: I have not tried this, but I have previ

Re: dlopen(0, RTLD_LAZY) doesn't work?

2002-02-07 Thread Kent Watsen
cc foo.o ... -o foo > > >Note: I have not tried this, but I have previously used >dlopen(NULL,RTLD_LAZY) successfully. Also, I do not think that you can >call printf() without first attaching to the console within your >dlopened routine. > >Stephano Mariani > >-Origin

Re: dlopen(0, RTLD_LAZY) doesn't work?

2002-02-06 Thread Kent Watsen
, "foo"); if (func == NULL) { printf("GetProcAddress() failed (code %u)\n", GetLastError()); exit(0); } printf("do something meaningful\n"); return 0; } Kent Watsen wrote: > > Hi, > > I've read the ma

dlopen(0, RTLD_LAZY) doesn't work?

2002-02-06 Thread Kent Watsen
Hi, I've read the mailing list archives and searched google trying to figure out how to get the following program to work. All you have to do is save it to a file (foo.c), compile (gcc foo.c), and run - I always get "dlsym() failed." Note, I have tried many variations of extern and _declspec a