Question about linking .so libraries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all, 
Hi, I have a question about linking .so libraries. 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Question:
I have successfully added a new dialog in Impress according to the steps in this tutorial - Development/Create new dialog in Impress - The Document Foundation Wiki. Now I wish to call functions in an external library in the dialog source file.
I have an external library libxxx containing some C++ header files and a .so file. I put the header files in a subfolder in include/ folder and .so file outside libreoffice directory. And I include the header files in dialog source files located in sd/source/ui/dlg. Then I rerun the autogen.sh with extra arguments, trying to let the build system know I have a .so library to link. 

./autogen.sh LDFLAGS=-L/path_to_libxxx LIBS=-lxxx

I rebuild the sd module using make sd, however, it seems the functions in .so library is not properly linked. 

"/usr/bin/ld: /home/jingze_xu/office/libreoffice-7.6.0.0.beta1/workdir/CxxObject/sd/source/ui/dlg/HelloDialog.o: in function `sd::SdHelloDialog::OKHdl(weld::Button&)':
HelloDialog.cxx:(.text+0x36c): undefined reference to `Add_FileHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short)'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/jingze_xu/office/libreoffice-7.6.0.0.beta1/sd/Library_sdui.mk:10: /home/jingze_xu/office/libreoffice-7.6.0.0.beta1/instdir/program/libsduilo.so] Error 1
make: *** [Makefile:121: sd] Error 2"

Are there any clues about linking .so libraries in libreoffice codebase?
Thanks!
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Best wishes,
Jingze Xu

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux