This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Plugins and referencing *variables* in the loading program
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Fri, 08 Oct 2004 11:23:41 -0700
- Subject: Re: Plugins and referencing *variables* in the loading program
- Organization: My own little world...
- References: <41667322.8040706@emirates.net.ae>
- Reply-to: cygwin at cygwin dot com
Maarten Boekhold wrote:
> suppose I have application A, that loads (gmodule_open) a module B. 'A'
> contains a variable:
>
> A.c:
> G_MODULE_EXPORT int var = 1;
>
> B refers to that variable:
>
> B.c:
> G_MODULE_IMPORT int var;
>
> B is linked with a A.def file:
>
> A.def:
> IMPORTS
> var = A.exe.var
>
> When I use 'var' in B, it has a completely wrong value.
>
> Can the windows linker resolve references to external variables when
> loading a library with gmodule_open/dlopen?
You might want to read this thread:
<http://sources.redhat.com/ml/cygwin/2004-10/msg00339.html>
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/