[mythtv] I'm working on UNICABLE improvment - help needed
jyavenard at gmail.com
Mon Aug 26 15:37:15 UTC 2013
On 26 August 2013 21:06, warpme <warpme at o2.pl> wrote:
> Forgive me maybe lame question, but c++ isn't thing I know enough.
> I want to share&use global variable between all instances of dvbchannel
> My idea was to declare this variable as static in dvbchannel.h.
> class DVBChannel : public DTVChannel
> static QDateTime last_tuning;
> It compiles, but unfortunately linker returns:
> ../../libs/libmythtv/libmythtv-0.27.so: undefined reference to
> So what is best way to declare global, shared variable used by all instances
> of dvbchannel ?
if you define a static variable, it can't be just defined in the header.
so in your cpp add something like:
More information about the mythtv-dev