C++ 图书馆办公室C++;API缺少标头

C++ 图书馆办公室C++;API缺少标头,c++,api,libreoffice,C++,Api,Libreoffice,我目前正试图在无头模式下使用LibreOffice将文档转换为pdf。 我想使用LeBeice C++的API来完成这一点,但是我的问题是我找不到一些在LeBeffice C++例子中使用的头文件。p> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/bridge/XUnoUrlResolver.hpp> #include <com/sun/star/frame/Deskto

我目前正试图在无头模式下使用LibreOffice将文档转换为pdf。 我想使用LeBeice C++的API来完成这一点,但是我的问题是我找不到一些在LeBeffice C++例子中使用的头文件。p>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#包括
#包括
#包括
#包括
#包括
#包括
我正在使用Ubuntu 14.04并安装了libreoffice-dev包

< C++ >有人能解释一下如何正确使用LeBeice C++ C++吗?< /p> < p>我找到了答案。 这些文件必须使用cppumaker工具(随SDK一起提供)从IDL文件生成。从包含cppumaker的文件夹中,我以root用户身份运行此命令

./cppumaker -Gc -O"/usr/include/libreoffice/com/sun/star" /usr/lib/ure/share/misc/types.rdb /usr/lib/libreoffice/program/types/offapi.rdb /usr/lib/libreoffice/program/types/oovbaapi.rdb

添加选项
-Ipath/to/Libre\u office\u com
是否有帮助?如果您使用的是IDE,请浏览并将
path/to/Libre\u office\u com
添加到其他头文件中。还有一件事,您可以在替换
#include
#include“com/sun/star/beans/XPropertySet.hpp”
“com/sun/star/”下的“我只得到了文件夹/命名空间“uno”。