[mythtv] Ticket #4516: Fix broken Win32 build (circular references out of control again).

Andrei Tanas andrei at tanas.ca
Tue Jan 29 04:49:39 UTC 2008


> > I will elaborate on this: with this change, global variables
> (gContext
> > specifically) is "seen" as having different addresses when
> > referenced by
> > code from different files. For example, when mythfrontend/main.cpp
> > initializes gContext, the variable will be assigned the address of
> > the new
> > instance. However, when referenced by code from libmythupnp (don't
> > know
> > about others, couldn't get past this one), it will think that the
> > value of
> > gContext is something else (seemed random to me, don't know where
> > it got if
> > from).
> 
> Thanks. That is helpful.
> 
> (although I don't know why it is only a problem with globals
>   - if a symbol is defined in lib*bootstrap.a,
>     then that is what should be used by the local lib)
> 
> 
> I will try and research dlltool to see what options there are.
> I'm hoping that there is some way to specify a symbol,
> but without actually defining a global in lib*bootstrap.a
> 
> 
> Note that I haven't had time to play in MinGW today,
> and have a lot of work to do, so this may take a few days.
> But I'm hoping we can use this structure without reverting.

When you have time, take a look at http://svn.mythtv.org/trac/ticket/4546 -
why not something like this?
Exposing global variables does not seem like a good idea to me anyway.



More information about the mythtv-dev mailing list