SDKInstallation

From Apache OpenOffice Wiki
Revision as of 14:49, 13 May 2006 by SergeMoutou (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to install the SDK and compile the C++ examples

For both Linux and Windows the following points are very important if you want to succeed in building C++ components and snippets:

  • you need to have OpenOffice.org 1.1.0 or higher installed (SDK won't run without it)
  • you need to install the SDK into a directory other than the one of the OOo application

Installation under LINUX

The text below describe the installation of the SDK 1.1.0 for OpenOffice.org1.1.0

The Software Development Kit (SDK) works on the top of an existing Openoffice.org installation because of using the same libraries. The SDK requires an Openoffice.org installation. Even if you don't plan to use Java it is strongly recommended to install the JDK (1.4.1_01 or higher for OOo 1.1 SDK) Of course a C++ compiler is needed (3.0.1 or higher). GNU make (3.79.1 or higher) is also essential. When ready, launch :

tar xzvf Ooo_1.1.0_LinuxIntel_sdk.tar.gz

and go to the new created directory (in this example OpenOffice.org1.1_SDK) and launch the configure script which asks you relevant directories. We give here among others :

  • where is your OpenOffice.org installed ? (for me /usr/lib/openoffice : noted <Ooo> later)
  • Where is your Java SDK installed ? (for me /usr/java/j2sdk1.4.2_04)

Now you are ready to use the SDK. Every time you want to use it you have to launch the setsdkenv_unix script for environment variables. Automate this is not a problem under UNIX.

From now on, we will always note the SDK directory installation as : <OpenOffice.org1.1_SDK>. Please don't confuse with <Ooo> which is the openoffice.org /program/ directory.

You can find a little complement of this chapter in <OpenOffice.org1.1_SDK>/docs/install.html

Installation under Windows

You need a compiler out of the Microsoft Visual Studio family (other compilers like MinGW have turned out to be hard to configure for OOo on Windows). The first thing after having installed the SDK is to launch the configureWindowsNT.bat and set all the necessary directories for proper use of the SDK. If that has been done you have already installed everything, but *wait* one very important thing you should still know of: Every time you want to run your own code or one of the SDK examples you need to launch the setsdkenv_Windows batch file from your command shell. The title of it should now be "Shell prepared for SDK". Happy coding, compiling and building now (I tell you it's easy from now on!). GanescuCarmen describes some problems he encounter when trying SDK examples under Windows : “I also use the 1.1 OO version.

I had a lots of problems. Finally I succeeded to obtain the the header files, and in VC I needed some library to be included into project and some files(uno.idl) to be added to rdb files. It was very hard to understand what it means registry(the rdb file not the Registry itself).

I was expecting to register something in Registry but it wasn't like this. And with the service manager I had some problems, with the port, because the connection with 8100 port was not done. I had to modify a file and to add some code for 8100 port.

But I did it and it works now.”

Installing with the free MS Visual C++ Toolkit 2003

I have installed DevCpp to have a make executable file. I have downloaded the free Visual C++ Toolkit 2003 here : http://www.microsoft.com/downloads/details.aspx?FamilyID=272be09d-40bb-49fd-9cb0-4bfa122fa91b&displaylang=en and then I have installed it.

I launch first C:\openoffice\OpenOffice.org2.0_SDK\configureWindowsNT.bat which asks any questions :

Personal tools