Search code examples
c++openoffice.orgheader-filesopenoffice-writer

How to create/find header files in OpenOffice SDK 3.3.x


I have downloaded and installed the OpenOffice SDK 3.3.x and I cannot find the header files ( *.hpp or hxx ) files corresponding to the *.idl files. There are *.idl files under the ( idl/com/.../) directories. Under the include directory ( include/com/...) there are no corresponding *.hpp or *.hxx include files. I looked at the C++ samples and they all include headers like

#include <cppuhelper/bootstrap.hxx>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>

I get compiler error saying "Cannot open include file: 'com/sun/star/uno/Exception.hpp': No such file or directory" .... that is true because there is no Exception.hpp under the include directory and I cannot find any of the other X***.hpp as well. but there are *.lib files under the lib/ directory.

so my question is should I generate the *.hpp files from *.idl files ? using cppumaker.exe ?

or is it just my installtion is corrupt ?

please help to solve this issue. I really appreciate any help from you guys.

regards


Solution

  • Well I would imagine that you can generate the headers from the idl. The tool you use will be dependent on the ORB and the target compiler. For example TAO ORB using MSVC++ 7. You can put the commands in a .cmd file (windows) and add it as a pre-build step is you like.

    set path=%path%;..\..\thirdparty\ACE_wrappers_1.7.1\bin;..\..\thirdparty\ACE_wrappers_1.7.1\lib;
    set TAO_ROOT=..\..\thirdparty\ACE_wrappers_1.7.1\tao
    set ACE_ROOT=..\..\thirdparty\ACE_wrappers_1.7.1\ace
    
    tao_idl -Cw -GT foo.idl
    tao_idl -Cw -GT bar.idl
    tao_idl -Cw -GT foobar.idl
    

    NOTE: This is not specific to the OpenOffice SDK that you are asking about. I don't have any experience with that.