C++ Macro example: DocumentLoader

Stephan Bergmann sbergman at redhat.com
Mon Mar 21 12:56:42 UTC 2016


On 03/19/2016 01:20 PM, aitor_czr wrote:
> I installed libreoffice-dev-doc (1:4.3.3-2-deb8u2) in debian jessie
> including all the macro examples, and ran the
> "/usr/lib/libreoffice/sdk/setsdkenv_unix.sh" script. Trying to build
> DocumentLoader, this is what i get:
>
>
> root at gnuinos:/usr/lib/libreoffice/sdk/examples/cpp/DocumentLoader# make
> mkdir -p ../../../LINUXexample.out/obj/DocumentLoader
> gcc -c -fpic -fvisibility=hidden -O -I. -I../../../LINUXexample.out/inc
> -I../../../LINUXexample.out/inc/examples -I../../../include
> -I../../../LINUXexample.out/inc/DocumentLoader -DUNX -DGCC -DLINUX
> -DCPPU_ENV=gcc3 -DHAVE_GCC_VISIBILITY_FEATURE
> -o../../../LINUXexample.out/obj/DocumentLoader/DocumentLoader.o
> DocumentLoader.cxx
> mkdir -p ../../../LINUXexample.out/bin
> mkdir -p ../../../LINUXexample.out/misc/DocumentLoader
> g++ -Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs
> -Wl,--no-whole-archive -L"../../../LINUXexample.out/lib"
> -L"/usr/lib/libreoffice/sdk/lib" -L"" -o
> ../../../LINUXexample.out/bin/DocumentLoader
> ../../../LINUXexample.out/obj/DocumentLoader/DocumentLoader.o \
>    -luno_cppuhelpergcc3 -luno_cppu -luno_salhelpergcc3 -luno_sal
> g++: error: ../../../LINUXexample.out/bin/DocumentLoader: No such file
> or directory
> Makefile:69: recipe for target
> '../../../LINUXexample.out/bin/DocumentLoader' failed
> make: *** [../../../LINUXexample.out/bin/DocumentLoader] Error 1

Smells like a bug in Debian's packaging of the LibreOffice SDK.  The 
problem is the

   -L""

in the gcc invocation above.  Per the SDK's settings/settings.mk, that's 
expanded from

   -L"$(OO_SDK_URE_LIB_DIR)"

and OO_SDK_URE_LIB_DIR should be set as an environment variable in the 
SDK's setsdkenv_unix.sh.in (when you run the setsdkenv_unix script), but 
looks like in your case is empty or unset, for whatever reason.



More information about the LibreOffice mailing list