openoffice编译

编译openoffice是个费力的活,建议最好建个虚拟机,在虚拟机里跑,编译环境很重要,说不了装的什么软件就会影响编译,想我电脑装了UItraEdit,关联了js格式文件就导致编译openoffice出错,而且报的错误会往其他方向上误导。

编译具体步骤我就不说了我贴上官方的方法http://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO/Step_by_step#Windows_7大家可以照着这个一步一步来,编译中我遇到了几个问题跟大家说下。

一、配置环境

有几种方法

1.

./configure 
 --disable-build-mozilla 
 --with-mozilla-build="/cygdrive/d/OOo/mozilla-build-1.3" \
 --with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC" \
 --with-mspdb-path="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE" \
 --with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1" \
 --with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1" \
 --with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin" \
 --with-asm-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/Bin" \
 --with-csc-path="/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.5" \
 --with-jdk-home="/cygdrive/c/j2sdk1.5.0.06" \
 --with-directx-home="/cygdrive/d/OOo/DirectXSDK" \
 --with-ant-home=/ant \
2.

MSVC_HOME="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0"
SDK_PATH="/cygdrive/C/Program Files/Microsoft SDKs/Windows/v6.1"
./configure \
    --with-cl-home="$MSVC_HOME/VC" \
    --with-mspdb-path="$MSVC_HOME/Common7/IDE" \
    --with-asm-home="$MSVC_HOME/VC/Bin" \
    --with-frame-home="$SDK_PATH" \
    --with-psdk-home="$SDK_PATH" \
    --with-midl-path="$SDK_PATH/bin" \
    --with-directx-home="c:/Program Files (x86)/Microsoft DirectX SDK (June 2010)" \
    --with-jdk-home="/cygdrive/C/Program Files/Java/jdk1.6.0_45" \
    --with-csc-path="/cygdrive/C/Windows/Microsoft.NET/Framework/v3.5" \
    --with-ant-home="/cygdrive/c/apache-ant-1.9.0" \
    --with-dmake-url="http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2" \
    --with-epm-url=http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz \
    --enable-pch \
    --disable-atl \
    --disable-activex \
    --disable-binfilter \
    --without-junit

3.

./configure \
-with-cl-home='C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC' \
-with-mspdb-path='C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE' \
-with-asm-home='C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin' \
-with-csc-path='C:\Windows\Microsoft.NET\Framework\v3.5' \
-with-frame-home='C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A' \
-with-psdk-home='C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A' \
-with-midl-path='C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin' \
-with-jdk-home='C:\Program Files\Java\jdk1.7.0_21' \
-with-ant-home='C:\apache-ant-1.9.0' \
-with-dmake-url="http://dmake.apache-extras.org.codespot.com/files/dmake-4.12.tar.bz2" \
-with-epm-url="http://ftp.easysw.com/pub/epm/3.7/epm-3.7-source.tar.gz" \
-enable-pch \
-disable-directx \
-disable-atl \
-disable-activex \
-disable-binfilter \
-without-junit \
-enable-dbgutil 

第一种方法我没配置通过,路径不能识别,2、3都能配置通过。2是通过建立临时路径3是windows下寻找路径的方法。当然相应的路径你的根据自己的去配置。

别注意用vs2010的话要配置-with-cl-home='C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC' \的路径,配置10的话编译通不过,编译到libxml2时会报连接错误,配置

9.0就不会出这个错误。java要用1.6不要用1.7如果执行./configure是报c++编译器太老不是新版本的话就配置下系统环境变量把C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE加到path环境变量里。

二。代码错误

libxml2模块里代码有误,testapi.c里294行static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
    if (no == 0) return('a');
    if (no == 1) return(' ');
    //if (no == 2) return((xmlChar) '?);
    if (no == 2) return((xmlChar) '\xf8');
    return(0);
}把那个?替换成\xf8。

bean模块代码也有问题,编译通不过提示如下图错误

我修改了一下com_sun_star_comp_beans_LocalOfficeWindow.c里的代码就可以通过编译了直接把110行的result = JAWT_GetAWT(env, &awt);这句代码注释掉。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值