<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <font face="monospace">Hi Stephan,<br>
      <br>
    </font>
    <div class="moz-cite-prefix"><font face="monospace">On 02/01/2016
        02:04 PM, Stephan Bergmann wrote:<br>
      </font></div>
    <blockquote cite="mid:56AF57C0.8020700@redhat.com" type="cite"><font
        face="monospace">On 02/01/2016 12:24 PM, aitor_czr wrote:
        <br>
      </font>
      <blockquote type="cite" style="color: #000000;"><font
          face="monospace">$ make DocumentLoader.run
          <br>
          cd /usr/lib/libreoffice/sdk/LINUXexample.out/bin &&
          DocumentLoader
          <br>
          -env:URE_MORE_TYPES=<a moz-do-not-send="true"
            class="moz-txt-link-freetext" href="file://">file://</a>"/types/offapi.rdb"
          <br>
          "/usr/lib/libreoffice/sdk/test.odt"
          <br>
          Error: cannot establish a connection using
          <br>
'uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager':
          <br>
                  Connector : couldn't connect to socket (Success)
          <br>
          Makefile:101: recipe for target 'DocumentLoader.run' failed
          <br>
          make: *** [DocumentLoader.run] Error 1
          <br>
        </font>
        <font face="monospace"><br>
          I tried doing:
          <br>
        </font>
        <font face="monospace"><br>
          $/usr/lib/libreoffice/program/soffice
          <br>
          "--accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"
          &
          <br>
        </font>
        <font face="monospace"><br>
          before running the application, but it doesn't work.
          <br>
        </font></blockquote>
      <font face="monospace"><br>
        I cannot reproduce that problem; works fine here. You can use
        something like
        <br>
      </font>
      <font face="monospace"><br>
          netstat -an | grep 2083
        <br>
      </font>
      <font face="monospace"><br>
        to check that nothing is listening on port 2083 before you start
        soffice, and then again check that soffice started to listen on
        that port after starting soffice.</font></blockquote>
    <font face="monospace"><br>
      <br>
      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:<br>
      <br>
      <br>
      root@gnuinos:/usr/lib/libreoffice/sdk/examples/cpp/DocumentLoader#
      make<br>
      mkdir -p ../../../LINUXexample.out/obj/DocumentLoader<br>
      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<br>
      mkdir -p ../../../LINUXexample.out/bin<br>
      mkdir -p ../../../LINUXexample.out/misc/DocumentLoader<br>
      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 \<br>
        -luno_cppuhelpergcc3 -luno_cppu -luno_salhelpergcc3 -luno_sal <br>
      g++: error: ../../../LINUXexample.out/bin/DocumentLoader: No such
      file or directory<br>
      Makefile:69: recipe for target
      '../../../LINUXexample.out/bin/DocumentLoader' failed<br>
      make: *** [../../../LINUXexample.out/bin/DocumentLoader] Error 1<br>
      <br>
      <br>
      The same issue trying to build another c++ example (osiris; i.e, 
      odt2pdf.cxx):<br>
      <br>
      <br>
      root@gnuinos:/usr/lib/libreoffice/sdk/examples/cpp/osiris# make<br>
      mkdir -p /usr/lib/libreoffice/sdk/LINUXexample.out/obj/odt2pdf<br>
      gcc -c -fpic -fvisibility=hidden -O -I.
      -I/usr/lib/libreoffice/sdk/LINUXexample.out/inc
      -I/usr/lib/libreoffice/sdk/LINUXexample.out/inc/examples
      -I/usr/lib/libreoffice/sdk/include
      -I/usr/lib/libreoffice/sdk/LINUXexample.out/inc/odt2pdf -DUNX
      -DGCC -DLINUX -DCPPU_ENV=gcc3 -DHAVE_GCC_VISIBILITY_FEATURE
      -o/usr/lib/libreoffice/sdk/LINUXexample.out/obj/odt2pdf/odt2pdf.o
      odt2pdf.cxx<br>
      mkdir -p /usr/lib/libreoffice/sdk/LINUXexample.out/bin<br>
      mkdir -p /usr/lib/libreoffice/sdk/LINUXexample.out/misc/odt2pdf<br>
      g++ -Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs
      -Wl,--no-whole-archive
      -L"/usr/lib/libreoffice/sdk/LINUXexample.out/lib"
      -L"/usr/lib/libreoffice/sdk/lib" -L"" -o
      /usr/lib/libreoffice/sdk/LINUXexample.out/bin/odt2pdf
      /usr/lib/libreoffice/sdk/LINUXexample.out/obj/odt2pdf/odt2pdf.o \<br>
        -luno_cppuhelpergcc3 -luno_cppu -luno_salhelpergcc3
      -luno_sal     <br>
      g++: error: /usr/lib/libreoffice/sdk/LINUXexample.out/bin/odt2pdf:
      No such file or directory<br>
      Makefile:71: recipe for target
      '/usr/lib/libreoffice/sdk/LINUXexample.out/bin/odt2pdf' failed<br>
      make: *** [/usr/lib/libreoffice/sdk/LINUXexample.out/bin/odt2pdf]
      Error 1<br>
      <br>
      <br>
      In both cases, the binary is not generated:<br>
      <br>
      <br>
      case 1)  g++: error: ../../../LINUXexample.out/bin/DocumentLoader:
      No such file or directory<br>
      case 2)  g++: error:
      /usr/lib/libreoffice/sdk/LINUXexample.out/bin/odt2pdf: No such
      file or directory<br>
      <br>
      <br>
      On the other hand, i think that the used port isn't the origin of
      the issue. Sometimes i get:<br>
      <br>
      <br>
      root@gnuinos:/usr/lib/libreoffice/sdk/examples/cpp/osiris# netstat
      -an | grep 2083 <br>
      tcp        0      0 127.0.0.1:2083         
      0.0.0.0:*               LISTEN<br>
      <br>
      <br>
      and sometimes i don't get anything. In both cases i can run
      libreoffice succesfully via:<br>
      <br>
      <br>
    </font><code>$ soffice
      "--accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"<br>
      <br>
      <br>
      Thanks in advance,<br>
      <br>
        Aitor.<br>
    </code><br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>