Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 8 Oct 2004 10:10:26 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Maarten Boekhold cc: cygwin AT cygwin DOT com Subject: Re: Plugins and referencing *variables* in the loading program In-Reply-To: <41667322.8040706@emirates.net.ae> Message-ID: References: <41667322 DOT 8040706 AT emirates DOT net DOT ae> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 On Fri, 8 Oct 2004, Maarten Boekhold wrote: > Hi, > > 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? > > Maarten The short answer is "no". The slightly longer answer is: "do you Google?" Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Happiness lies in being privileged to work hard for long hours in doing whatever you think is worth doing." -- Dr. Jubal Harshaw -- 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/