We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

Working with UNO I get linking error

asked 2021-06-10 23:10:15 +0200

davalillocm gravatar image

updated 2021-06-12 19:46:06 +0200

Working with UNO on Fedora Linux 64 bits after add references to the SDK libraries libuno_cppu.so, libuno_cppuhelpergcc3.so, libuno_purpenvhelpergcc3.so, libuno_sal.so and libuno_salhelpergcc3.so in the folder /usr/lib64/libreoffice/sdk/lib and add as linking path the folder /usr/lib64/libreoffice/program I get the following error on my IDE (codeblocks 20.03)

/usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference to unoidl::Manager::createCursor(rtl::OUString const&) const' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference toxmlreader::XmlReader::registerNamespaceIri(xmlreader::Span const&)' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference to xmlreader::Span::convertFromUtf8() const' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference tovtable for unoidl::Manager' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference to unoidl::Manager::addProvider(rtl::OUString const&)' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference toinitRegistry_Api' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference to xmlreader::XmlReader::~XmlReader()' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference toxmlreader::XmlReader::getAttributeValue(bool)' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference to unoidl::Manager::findEntity(rtl::OUString const&) const' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference toxmlreader::XmlReader::nextAttribute(int, xmlreader::Span)' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference to xmlreader::XmlReader::XmlReader(rtl::OUString const&)' /usr/bin/ld: /usr/lib64/libreoffice/sdk/lib/libuno_cppuhelpergcc3.so: undefined reference toxmlreader::XmlReader::nextItem(xmlreader::XmlReader::Text, xmlreader::Span, int)' collect2: error: ld returned 1 exit status

What are the libs and paths to link the UNO library right in an application?

I'm doing an application to make reports in calc ods files, I need the objects and methods in the UNO library to create and manipulate these files. At the beginning I don't understood much the philosophy of the library but after doing an extensive read to the poor quality documentation of UNO I finally make a little progress. After successfully compile a own library that have a method to create an ods file now I'm just making a console application to test it. But it not compile and shows the error I posted...

In my lib header I have

#include <stdio.h>
#include <wchar.h>
#include <sal/main.h>
#include <cppuhelper/bootstrap.hxx>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <string.h>
#include "appset.h"
#include "interop.h"

using namespace std;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::frame;
using namespace com::sun::star::sheet;
using namespace cppu;
using namespace canonbit_definitions::interoperatibility;

using ::rtl::OUString ...
(more)
edit retag flag offensive close merge delete

Comments

This is a follow-up question of https://ask.libreoffice.org/en/questi.... Please finish cleaning up as requested by @erAck: "Deleting this your answer and converting it to a comment instead would be welcome." Also there is another post that should be marked as solved: https://stackoverflow.com/questions/6....

Jim K gravatar imageJim K ( 2021-06-11 06:20:43 +0200 )edit

Ok, I already followed the rules clean all up, add comments and give thanks....so there is no solution for this problem? This one is easy just don't figure it out because I'm new on Linux and more new with Libreoffice... I'm sure that smart people from here can answer it.....

davalillocm gravatar imagedavalillocm ( 2021-06-11 07:58:57 +0200 )edit

We don't know what you are doing. It may already help to adapt a sample makefile from the SDK as I lined out in my answer to that other question.

erAck gravatar imageerAck ( 2021-06-11 12:36:01 +0200 )edit

I'm doing an application to make reports in calc ods files, I need the objects and methods in the UNO library to create and manipulate these files. At the beginning I don't understood much the philosophy of the library but after doing an extensive read to the poor quality documentation of UNO I finally make a little progress. After successfully compile a own library that have a method to create an ods file now I'm just making a console application to test it. But it not compile and shows the error I posted...

davalillocm gravatar imagedavalillocm ( 2021-06-11 18:06:45 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-06-12 23:17:24 +0200

davalillocm gravatar image

I solve my own problem.....

I found the libs to link to:

  1. libunoidllo.so
  2. libxmlreaderlo.so
  3. libreglo.so

And then added the linking path /usr/lib64/libreoffice/program where those libs reside

Thanks you for the help any way......

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-06-10 23:10:15 +0200

Seen: 33 times

Last updated: yesterday