<div dir="ltr">Hi Markus<div><br></div><div style>Yeap, your tip solved my problem. </div><div style>Thank you for your explanation<br></div><div style><br></div><div style>All the best</div><div style>:)</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 6 February 2013 23:24, Markus Mohrhard <span dir="ltr"><<a href="mailto:markus.mohrhard@googlemail.com" target="_blank">markus.mohrhard@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey,<br>
<br>
2013/2/7 José Guilherme Vanz <<a href="mailto:guilherme.sft@gmail.com">guilherme.sft@gmail.com</a>>:<br>
<div><div class="h5">> Hi<br>
> I started work in this bug. I created the first simple source file, just for<br>
> test.<br>
> My doubt is, is necessary add my source file in some config file?<br>
><br>
> In my test I created a object of my thread in the docfile.cxx. Nothing<br>
> special...<br>
> When I build the module occours the following fail:<br>
><br>
> [build LNK] Library/libsfxlo.so<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o</a>:<br>
> In function `SfxMedium::LockOrigFileOnDemand(unsigned char, unsigned char)':<br>
> /home/vanz/gitroot/libo/sfx2/source/doc/docfile.cxx:1188: undefined<br>
> reference to `salhelper::Thread::launch()'<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o</a>:<br>
> In function `salhelper::Thread::operator delete(void*)':<br>
> /home/vanz/gitroot/libo/solver/<a href="http://unxlngx6.pro/inc/salhelper/thread.hxx:89" target="_blank">unxlngx6.pro/inc/salhelper/thread.hxx:89</a>:<br>
> undefined reference to `salhelper::SimpleReferenceObject::operator<br>
> delete(void*)'<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o</a>:<br>
> In function `WatchFileThread::WatchFileThread(char const*)':<br>
> /home/vanz/gitroot/libo/sfx2/source/doc/watchfilethread.hxx:28: undefined<br>
> reference to `salhelper::Thread::Thread(char const*)'<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o</a>:<br>
> In function `WatchFileThread::~WatchFileThread()':<br>
> /home/vanz/gitroot/libo/sfx2/source/doc/watchfilethread.hxx:25: undefined<br>
> reference to `salhelper::Thread::~Thread()'<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x28)" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x28)</a>:<br>
> undefined reference to `salhelper::Thread::run()'<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x30)" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x30)</a>:<br>
> undefined reference to `salhelper::Thread::onTerminated()'<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x80)" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x80)</a>:<br>
> undefined reference to `non-virtual thunk to salhelper::Thread::run()'<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x88)" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x88)</a>:<br>
> undefined reference to `non-virtual thunk to<br>
> salhelper::Thread::onTerminated()'<br>
> /home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTI15WatchFileThread[_ZTI15WatchFileThread]+0x10)" target="_blank">unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTI15WatchFileThread[_ZTI15WatchFileThread]+0x10)</a>:<br>
> undefined reference to `typeinfo for salhelper::Thread'<br>
> collect2: error: ld returned 1 exit status<br>
> make[1]: ***<br>
> [/home/vanz/gitroot/libo/workdir/<a href="http://unxlngx6.pro/LinkTarget/Library/libsfxlo.so" target="_blank">unxlngx6.pro/LinkTarget/Library/libsfxlo.so</a>]<br>
> Error 1<br>
> make: *** [sfx2] Error 2<br>
><br>
> What is my error? The build creates a .so of the module ( [build LNK]<br>
> Library/libsfxlo.so ) ?<br>
><br>
> Thank you!<br>
><br>
><br>
><br>
> On 4 February 2013 11:35, Michael Stahl <<a href="mailto:mstahl@redhat.com">mstahl@redhat.com</a>> wrote:<br>
>><br>
>> 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>
>> 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>
><br>
><br>
<br>
<br>
</div></div>You should add salhelper to gb_Library_use_libraries in sfx2/Library_sfx.mk<br>
<br>
It seems that sfx2 is not yet depending on salhelper but it looks like<br>
there is no problem in linking against salhelper in sfx2. Since we are<br>
not mentioning salhelper linking fails because it can't find the<br>
symbols. I hope that helps you resolve your problems.<br>
<br>
Regards,<br>
Markus<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>