<html><body>
<p>the basic folder structure download from SVN as follows(including mythhello plugin folder according to that sample mythhello plugin building):<br>
(0)/release-0-20-fixes<br>
       (1)/mythtv<br>
               (2)/libs<br>
                     (3)/libmyth<br>
                            (4.1)/mythcontext.h<br>
                            (4.2)/mythdbcon.h<br>
                               ..<br>
       (1)/mythplugins<br>
               (2)mythconfig.mak<br>
               (2)/mythhello<br>
                     (3)mythhello.pro<br>
                     (3)mythhello<br>
                            (4.3)mythhello.h<br>
                            (4.4)main.cpp<br>
                            (4.5)mythhello.cpp<br>
                            (4.6)mythhello.pro<br>
                            (4.7)hello-ui.xml        <br>
<br>
       (1)/myththemes  <br>
<br>
question: in the (4.4)main.cpp file, the header files declaration is as follows(according to that sample mythhello plugin building):<br>
#include &lt;mythtv/mythcontext.h&gt;<br>
#include &lt;mythtv/mythdbcon.h&gt;<br>
<br>
however, those c++ header files, such as (4.1)/mythcontext.h and (4.2)/mythdbcon.h as declared above is in anthote folder, should be: #include &lt;/mythtv/libs/libmyth/mythcontext.h&gt;......<br>
<br>
But,if so, then other plugin header declaration still has errors, such as the mythmusic source code.<br>
<br>
PUZZLING!<br>
<br>
so, I have the following questions:<br>
<br>
(1)the folder structure given by that sample mythhello plugin building is right? or #include &lt;/mythtv/libs/libmyth/mythcontext.h&gt;...... is right? but when I correct into &lt;/mythtv/libs/libmyth/mythcontext.h&gt;......, there are still some prblems for those header files own, such as some sytax errors etc...<br>
(2)note: my os is MythDora, which includes mythtv, and I don't need to install mythtv after finishing installing mythdora, and can use mythtv directly.<br>
Moreover, there are the same lib and header files in /root/mythtv/libs/libmyth on my system, does this mean I need not to compile the myth source code again and the required header files have exist?<br>
(3)when I build one simple plugin without header files, and don't need to use any other header files in other folders, just use one main.cpp with other .pro ...,;<br>
  (3.1)this main.cpp c++ file is right to build plugin with such init, run and config part? Although I can qmake, make and make install successfully, but the problem is: mythtv can't open after reboot, just with two seconds mythtv screen appear, and then dispear and return to Desktop again, the same instance when double click on MythTV icon on Desktop.<br>
<br>
and when I remove the created &quot;libmythhello.so&quot; from the folder: URL:<a href="file:///usr/lib/mythtv/plugins/libmythhello.so">file:///usr/lib/mythtv/plugins/libmythhello.so</a>, everything return to be OK, and mythtv can be open again.<br>
  (3.2)after I type mythfrontend -v all on terminal, I can't find any errors from those message on terminal, how to analyze it?<br>
<br>
I am puzzled about this problem, does that means the initialization has erros, but I just made so simple main.cpp with that simple mythplugin_init();<br>
<br>
Puzzled!<br>
Asking for help, many thanks!<br>
   (3.3)many thanks! <br>
<br>
////////////////////////////////////////////////<br>
///// (1) main.cpp<br>
///////////////////////////////////////////////<br>
#ifndef MAIN_CPP<br>
#define MAIN_CPP<br>
<br>
extern &quot;C&quot; {<br>
int mythplugin_init(const char *libversion);<br>
int mythplugin_run(void);<br>
int mythplugin_config(void);<br>
}<br>
<br>
int mythplugin_init(const char *libversion)<br>
{<br>
return 0;<br>
}<br>
int mythplugin_run (void)<br>
{<br>
return 0;<br>
}<br>
<br>
int mythplugin_config (void) { return 0; }<br>
<br>
#endif<br>
<br>
and<br>
<br>
////////////////////////////////////////////////////////////////////////////<br>
/////_(2)_(start) qmake, make and make install on terminal (start)_<br>
///////////////////////////////////////////////////////////////////////////<br>
[root@mythtv mythhello]# qmake<br>
[root@mythtv mythhello]# make<br>
cd mythhello &amp;&amp; make -f Makefile<br>
make[1]: Entering directory `/test_XJR/mythplugintest/mythplugins/mythhello/myth<br>
hello'<br>
g++ -c -pipe -fomit-frame-pointer -pthread -D_THREAD_SAFE -Wall -W -DPIC -fPIC<br>
-D_GNU_SOURCE -DPREFIX=&quot;/usr/&quot; -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_PLUGIN<br>
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.2.2/mkspecs/f<br>
reebsd-g++ -I. -I/usr/local/Trolltech/Qt-4.2.2/include/QtCore -I/usr/local/Troll<br>
tech/Qt-4.2.2/include/QtCore -I/usr/local/Trolltech/Qt-4.2.2/include/QtGui -I/us<br>
r/local/Trolltech/Qt-4.2.2/include/QtGui -I/usr/local/Trolltech/Qt-4.2.2/include<br>
-I/usr/include -I/usr/kde/3.3/include -I/usr/include -I. -I. -I/usr/local/inclu<br>
de -o main.o main.cpp<br>
main.cpp:12: warning: unused parameter 'libversion'<br>
g++ -c -pipe -fomit-frame-pointer -pthread -D_THREAD_SAFE -Wall -W -DPIC -fPIC<br>
-D_GNU_SOURCE -DPREFIX=&quot;/usr/&quot; -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.2.2/mkspecs/f reebsd-g++ -I. -I/usr/local/Trolltech/Qt-4.2.2/include/QtCore -I/usr/local/Troll tech/Qt-4.2.2/include/QtCore -I/usr/local/Trolltech/Qt-4.2.2/include/QtGui -I/us r/local/Trolltech/Qt-4.2.2/include/QtGui -I/usr/local/Trolltech/Qt-4.2.2/include -I/usr/include -I/usr/kde/3.3/include -I/usr/include -I. -I. -I/usr/local/inclu de -o mythhello.o mythhello.cpp<br>
rm -f libmythhello.so<br>
g++ -pthread -Wl,-rpath,/usr/local/Trolltech/Qt-4.2.2/lib -shared -o libmythhell o.so main.o mythhello.o -L/usr/local/lib -L/usr/kde/3.3/lib -L/usr/local/Troll tech/Qt-4.2.2/lib -L/usr//lib -lQtGui -L/test_XJR/qt-x11-opensource-src-4.2.2/li b -L/usr/X11R6/lib -lXext -lX11 -lQtCore -lz -lm -lglib-2.0 -lpthread -ldl<br>
make[1]: Leaving directory `/test_XJR/mythplugintest/mythplugins/mythhello/mythh ello'<br>
[root@mythtv mythhello]# make install<br>
cd mythhello &amp;&amp; make -f Makefile install<br>
make[1]: Entering directory `/test_XJR/mythplugintest/mythplugins/mythhello/myth hello'<br>
cp -f &quot;libmythhello.so&quot; &quot;/usr/lib/mythtv/plugins/libmythhello.so&quot;<br>
cp -f /test_XJR/mythplugintest/mythplugins/mythhello/mythhello/hello-ui.xml /usr //share/mythtv/themes/default/<br>
make[1]: Leaving directory `/test_XJR/mythplugintest/mythplugins/mythhello/mythh ello'<br>
[root@mythtv mythhello]#<br>
////////////////////////////////////////////////////////////////////////////<br>
/////_(2)_(stop) qmake, make and make install on terminal (stop)_<br>
///////////////////////////////////////////////////////////////////////////</body></html>