<div dir="ltr">Hi<div><div>I started work in this bug. I created the first simple source file, just for test.</div><div>My doubt is, is necessary add my source file in some config file? </div><div><br></div><div>In my test I created a object of my thread in the docfile.cxx. Nothing special... </div>
<div>When I build the module occours the following fail: </div></div><div><br><div><div>[build LNK] Library/libsfxlo.so</div><div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o">unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o</a>: In function `SfxMedium::LockOrigFileOnDemand(unsigned char, unsigned char)':</div>
<div>/home/vanz/gitroot/libo/sfx2/source/doc/docfile.cxx:1188: undefined reference to `salhelper::Thread::launch()'</div><div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o">unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o</a>: In function `salhelper::Thread::operator delete(void*)':</div>
<div>/home/vanz/gitroot/libo/solver/<a href="http://unxlngx6.pro/inc/salhelper/thread.hxx:89">unxlngx6.pro/inc/salhelper/thread.hxx:89</a>: undefined reference to `salhelper::SimpleReferenceObject::operator delete(void*)'</div>
<div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o">unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o</a>: In function `WatchFileThread::WatchFileThread(char const*)':</div>
<div>/home/vanz/gitroot/libo/sfx2/source/doc/watchfilethread.hxx:28: undefined reference to `salhelper::Thread::Thread(char const*)'</div><div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o">unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o</a>: In function `WatchFileThread::~WatchFileThread()':</div>
<div>/home/vanz/gitroot/libo/sfx2/source/doc/watchfilethread.hxx:25: undefined reference to `salhelper::Thread::~Thread()'</div><div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x28)">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x28)</a>: undefined reference to `salhelper::Thread::run()'</div>
<div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x30)">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x30)</a>: undefined reference to `salhelper::Thread::onTerminated()'</div>
<div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x80)">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x80)</a>: undefined reference to `non-virtual thunk to salhelper::Thread::run()'</div>
<div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x88)">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x88)</a>: undefined reference to `non-virtual thunk to salhelper::Thread::onTerminated()'</div>
<div>/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTI15WatchFileThread[_ZTI15WatchFileThread]+0x10)">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTI15WatchFileThread[_ZTI15WatchFileThread]+0x10)</a>: undefined reference to `typeinfo for salhelper::Thread'</div>
<div>collect2: error: ld returned 1 exit status</div><div>make[1]: *** [/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/LinkTarget/Library/libsfxlo.so">unxlngx6.pro/LinkTarget/Library/libsfxlo.so</a>] Error 1</div>
<div>make: *** [sfx2] Error 2</div></div></div><div><br></div><div style>What is my error? The build creates a .so of the module ( [build LNK] Library/libsfxlo.so ) ?</div><div style><br></div><div style>Thank you!</div><div>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 February 2013 11:35, Michael Stahl <span dir="ltr"><<a href="mailto:mstahl@redhat.com" target="_blank">mstahl@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 04/02/13 14:30, Jan Holesovsky wrote:<br>
> Regarding your question in the bug - LO has its own threading API, you<br>
> can use class Thread from sal/inc/osl/thread.hxx<br>
><br>
> <a href="http://cgit.freedesktop.org/libreoffice/core/tree/sal/inc/osl/thread.hxx" target="_blank">http://cgit.freedesktop.org/libreoffice/core/tree/sal/inc/osl/thread.hxx</a><br>
><br>
> You basically want to derive your class SomeGoodNameThread: class Thread<br>
> {}; where you overload the virtual run(); method.<br>
<br>
</div>no, you should not derive from osl::Thread but instead from<br>
salhelper::Thread which avoids some pitfalls automatically.<br>
<br>
salhelper/inc/salhelper/thread.hxx<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Att. José Guilherme Vanz<br><a href="http://br.linkedin.com/pub/jos%C3%A9-guilherme-vanz/51/b27/58b/" title="Visualizar perfil público" name="SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter_webProfileURL" style="margin:0px 10px 0px 0px;padding:0px 0px 0px 19px;border:0px;outline:0px;font-size:11px;font-family:Helvetica,FreeSans,'Liberation Sans',Helmet,Arial,sans-serif;vertical-align:middle;text-decoration:initial;color:rgb(102,102,102);font:inherit;display:inline-block;background-image:url(http://s.c.lnkd.licdn.com/scds/common/u/images/apps/profile/sprite/sprite_profile_top_card_v6.png);background-color:rgb(246,246,246);line-height:13.199999809265137px;background-repeat:no-repeat no-repeat" target="_blank">br.linkedin.com/pub/josé-guilherme-vanz/51/b27/58b/</a><br>
<div><a href="http://blog.pt-br.libreoffice.org/" target="_blank">http://blog.pt-br.libreoffice.org/</a><br></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-weight:bold"><a href="https://groups.google.com/d/forum/openqg" target="_blank">https://groups.google.com/d/forum/openqg</a></span><br>
</div></div>
</div>