Bug #47065

José Guilherme Vanz guilherme.sft at gmail.com
Wed Feb 6 17:05:32 PST 2013


Hi
I started work in this bug. I created the first simple source file, just
for test.
My doubt is, is necessary add my source file in some config file?

In my test I created a object of my thread in the docfile.cxx. Nothing
special...
When I build the module occours the following fail:

[build LNK] Library/libsfxlo.so
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o: In function
`SfxMedium::LockOrigFileOnDemand(unsigned char, unsigned char)':
/home/vanz/gitroot/libo/sfx2/source/doc/docfile.cxx:1188: undefined
reference to `salhelper::Thread::launch()'
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o: In function
`salhelper::Thread::operator delete(void*)':
/home/vanz/gitroot/libo/solver/unxlngx6.pro/inc/salhelper/thread.hxx:89:
undefined reference to `salhelper::SimpleReferenceObject::operator
delete(void*)'
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o: In function
`WatchFileThread::WatchFileThread(char const*)':
/home/vanz/gitroot/libo/sfx2/source/doc/watchfilethread.hxx:28: undefined
reference to `salhelper::Thread::Thread(char const*)'
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/docfile.o: In function
`WatchFileThread::~WatchFileThread()':
/home/vanz/gitroot/libo/sfx2/source/doc/watchfilethread.hxx:25: undefined
reference to `salhelper::Thread::~Thread()'
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x28):
undefined reference to `salhelper::Thread::run()'
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x30):
undefined reference to `salhelper::Thread::onTerminated()'
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x80):
undefined reference to `non-virtual thunk to salhelper::Thread::run()'
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTV15WatchFileThread[_ZTV15WatchFileThread]+0x88):
undefined reference to `non-virtual thunk to
salhelper::Thread::onTerminated()'
/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/CxxObject/sfx2/source/doc/watchfilethread.o:(.data.rel.ro._ZTI15WatchFileThread[_ZTI15WatchFileThread]+0x10):
undefined reference to `typeinfo for salhelper::Thread'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/vanz/gitroot/libo/workdir/
unxlngx6.pro/LinkTarget/Library/libsfxlo.so] Error 1
make: *** [sfx2] Error 2

What is my error? The build creates a .so of the module ( [build LNK]
Library/libsfxlo.so ) ?

Thank you!



On 4 February 2013 11:35, Michael Stahl <mstahl at redhat.com> wrote:

> On 04/02/13 14:30, Jan Holesovsky wrote:
> > Regarding your question in the bug - LO has its own threading API, you
> > can use class Thread from sal/inc/osl/thread.hxx
> >
> > http://cgit.freedesktop.org/libreoffice/core/tree/sal/inc/osl/thread.hxx
> >
> > You basically want to derive your class SomeGoodNameThread: class Thread
> > {}; where you overload the virtual run(); method.
>
> no, you should not derive from osl::Thread but instead from
> salhelper::Thread which avoids some pitfalls automatically.
>
> salhelper/inc/salhelper/thread.hxx
>
>


-- 
Att. José Guilherme Vanz
br.linkedin.com/pub/josé-guilherme-vanz/51/b27/58b/<http://br.linkedin.com/pub/jos%C3%A9-guilherme-vanz/51/b27/58b/>
http://blog.pt-br.libreoffice.org/
https://groups.google.com/d/forum/openqg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130206/4f927a99/attachment-0001.html>


More information about the LibreOffice mailing list