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
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
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
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
, "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
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
6 matches
Mail list logo