[prev in list] [next in list] [prev in thread] [next in thread]
List: mythtv-dev
Subject: [mythtv] =?utf-8?q?I=27m_working_on_UNICABLE_improvment_-_help_ne?= =?utf-8?q?eded?=
From: warpme <warpme () o2 ! pl>
Date: 2013-08-26 11:06:19
Message-ID: 248a4bc7.a21dbe1.521b36ab.69a0b () o2 ! pl
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
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 objects.
My idea was to declare this variable as static in dvbchannel.h.
class DVBChannel : public DTVChannel
{
public:
static QDateTime last_tuning;
It compiles, but unfortunately linker returns:
../../libs/libmythtv/libmythtv-0.27.so: undefined reference to `DVBChannel::last_tuning'
So what is best way to declare global, shared variable used by all instances of dvbchannel ?
Thx in advance
[Attachment #5 (text/html)]
Hi,<br />
Forgive me maybe lame question, but c++ isn't thing I know enough.<br />
<br />
I want to share&use global variable between all instances of dvbchannel objects.<br />
My idea was to declare this variable as static in dvbchannel.h.<br />
<br />
class DVBChannel : public DTVChannel<br />{<br /> public:<br />
static QDateTime last_tuning;<br />
<br />
It compiles, but unfortunately linker returns:<br />
../../libs/libmythtv/libmythtv-0.27.so: undefined reference to `DVBChannel::last_tuning' <br />
<br />
So what is best way to declare global, shared variable used by all instances of dvbchannel ?<br />
<br />
Thx in advance<br />
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic