OpenOffice SDK configuration for Windows 7 (5)

Source: Internet
Author: User

This article describes how to integrate the OpenOffice SDK in vs2005.

1. First generate the HPP template header file of the IDL Interface

First, create a includecpp clip under <office-SDK-path>.

 
"F: \ part _ OpenOffice \ OpenOffice. org3 \ basis \ SDK/bin/cppumaker "-GC-bucr-o" F: \ part _ OpenOffice \ OpenOffice. org3 \ basis \ SDK \ includecpp "" F:/part _ OpenOffice/OpenOffice. org3/ure/MISC // types. RDB "" F:/part _ OpenOffice/OpenOffice. org3/basis/program // offapi. RDB"

Use this command to generate a template file. This command will generate a template file under includecpp.

In addition, do not forget to execute setsdkenv_windows.bat before execution.

There is another method,IsF: \ part _ OpenOffice \ OpenOffice. org3.4 _ SDK \ winexample. Out \ IncCopy the object to includehpp.

Cause:

F: \ part _ OpenOffice \ OpenOffice. org3.4 _ SDK \ winexample. the file in out \ Inc is the same as the file we will generate. The class capacity in this clip is generated when we compile documentloader.


2. Set the relevant path of vs2005

1). Set the executable file directory

F: \ part _ OpenOffice \ OpenOffice. org3 \ Program

F: \ part _ OpenOffice \ OpenOffice. org3 \ ure \ bin

2). Set the inclusion path

F: \ part _ OpenOffice \ OpenOffice. org3 \ basis \ SDK \ include

F: \ part _ OpenOffice \ OpenOffice. org3 \ basis \ SDK \ includecpp

3). Set the library directory

F: \ part _ OpenOffice \ OpenOffice. org3 \ basis \ SDK \ Lib

Directory configuration is complete, we can create a new blank project for testingDocumentloaderFor example:

1) create a blank project oo_test

2) Copy documentloader. cpp to oo_test.

3) add documentloader. cpp to the project.

4) add in PreprocessingXylose; cppu_env = MSCIThese two macros are very important. We need to add them to every project in the future.

5) Add a dependency to the linkIsal. Lib icppu. Lib icppuhelper. Lib isalhelper. Lib ireg. Lib stlport_vc71.lib 

Then execute the newly generated oo_test and the documentloader method we generated before execution are the same.



Reference 1: Http://blog.csdn.net/jwybobo2007/article/details/8532226

This article reference 2: http://blog.csdn.net/douyangyang/article/details/4134816

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.