Can't build DocumentLoader example: error C1189
Posted: Fri Nov 21, 2008 3:07 pm
I'm trying to migrate from MS Office to OOO but getting started with UNO was difficult. I can't compile the C++ example DocumentLoader.cxx.
I get the following error: c:\Program\OpenOffice2_4_SDK\include\sal\types.h(77): fatal error C1189: #error : "Could not find 16-bit type, add support for your architecture
I have searched the Internet for days without success.
My Build log:
------- Build started: Project: UNOExWin32Consol03, Configuration: Debug|Win32 -------
Command Lines
Creating temporary file "d:\MinaFiler\MinaDokument\OOB\ExamplesUNO\UNOExWin32Consol03\UNOExWin32Consol03\Debug\RSP000002.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_AFXDLL" /D "_ATL_STATIC_REGISTRY" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp"Debug/UNOExWin32Consol03.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Wp64 /ZI /TP
c:\Program\OpenOffice2_4_SDK\examples\cpp\DocumentLoader\DocumentLoader.cxx
]
Creating command line "cl.exe @d:\MinaFiler\MinaDokument\OOB\ExamplesUNO\UNOExWin32Consol03\UNOExWin32Consol03\Debug\RSP000002.rsp /nologo"
What I have done:
1.Installed OpenOffice.org 2.4 SDK (en-US)t trying to follow instructions at http://wiki.services.openoffice.org/wik ... stallation
and changed:
REM Set environment for C++ compiler tools, if necessary.
if defined OO_SDK_CPP_HOME call "C:\Program Files\Microsoft Visual C++ Toolkit 2003\VCVARS32.bat"
to:
REM Set environment for C++ compiler tools, if necessary.
if defined OO_SDK_CPP_HOME call "C:\Program\Microsoft Visual Studio .NET 2003\Vc7\bin\VCVARS32.bat"
in file: setsdkenv_windows.bat
2. I have added this to C:\Program\OpenOffice2_4_SDK\examples\cpp\DocumentLoader\Makefile
# Builds the C++ DocumentLoader example of the SDK.
#define WIN32
#define WNT
#define WINNT
#define CPPU_ENV=msci
3. I have added #include "stdafx.h" in DocumentLoader.cxx
I did not understand what was meant with the following sentence:: C:\openoffice\OpenOffice.org2.0_SDK\examples\DevelopersGuide\ProfUNO\CppBinding\office_connect.cxx to change the port accordingly to what OOo is listening.
My environment:
******************************************************************
*
* SDK environment is prepared for Windows
*
* SDK = C:\Program\OpenOffice2_4_SDK
* Office = C:\Program\OpenOffice2_4
* URE =
* Make = C:\Program\MinGW\bin
* Zip = C:\Program\OpenOffice2_4_SDK\windows\bin
* C++ Compiler = C:\Program\Microsoft Visual Studio .NET 2003\Vc7\bin
* C# and VB.NET compilers = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
* Java =
* Special Output directory = D:\MinaFiler\MinaDokument\OOB\SDKs
* Auto deployment = YES
*
******************************************************************
Microsoft Windows XP Professional Ver. 5.1.2600 Service Pack 3 build 2600 (Swedish)
C++ : Microsoft Visual Studio .NET 2003 ver: 7.1.6030
.NET Framework 1.1 ver. 1.1.4322 SP1
( I notice now that Visual Studio and setsdkenv_windows.bat report different versions of .NET Framework.)
Please don't let me stay with MS Office!
I get the following error: c:\Program\OpenOffice2_4_SDK\include\sal\types.h(77): fatal error C1189: #error : "Could not find 16-bit type, add support for your architecture
I have searched the Internet for days without success.
My Build log:
------- Build started: Project: UNOExWin32Consol03, Configuration: Debug|Win32 -------
Command Lines
Creating temporary file "d:\MinaFiler\MinaDokument\OOB\ExamplesUNO\UNOExWin32Consol03\UNOExWin32Consol03\Debug\RSP000002.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_AFXDLL" /D "_ATL_STATIC_REGISTRY" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp"Debug/UNOExWin32Consol03.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Wp64 /ZI /TP
c:\Program\OpenOffice2_4_SDK\examples\cpp\DocumentLoader\DocumentLoader.cxx
]
Creating command line "cl.exe @d:\MinaFiler\MinaDokument\OOB\ExamplesUNO\UNOExWin32Consol03\UNOExWin32Consol03\Debug\RSP000002.rsp /nologo"
What I have done:
1.Installed OpenOffice.org 2.4 SDK (en-US)t trying to follow instructions at http://wiki.services.openoffice.org/wik ... stallation
and changed:
REM Set environment for C++ compiler tools, if necessary.
if defined OO_SDK_CPP_HOME call "C:\Program Files\Microsoft Visual C++ Toolkit 2003\VCVARS32.bat"
to:
REM Set environment for C++ compiler tools, if necessary.
if defined OO_SDK_CPP_HOME call "C:\Program\Microsoft Visual Studio .NET 2003\Vc7\bin\VCVARS32.bat"
in file: setsdkenv_windows.bat
2. I have added this to C:\Program\OpenOffice2_4_SDK\examples\cpp\DocumentLoader\Makefile
# Builds the C++ DocumentLoader example of the SDK.
#define WIN32
#define WNT
#define WINNT
#define CPPU_ENV=msci
3. I have added #include "stdafx.h" in DocumentLoader.cxx
I did not understand what was meant with the following sentence:: C:\openoffice\OpenOffice.org2.0_SDK\examples\DevelopersGuide\ProfUNO\CppBinding\office_connect.cxx to change the port accordingly to what OOo is listening.
My environment:
******************************************************************
*
* SDK environment is prepared for Windows
*
* SDK = C:\Program\OpenOffice2_4_SDK
* Office = C:\Program\OpenOffice2_4
* URE =
* Make = C:\Program\MinGW\bin
* Zip = C:\Program\OpenOffice2_4_SDK\windows\bin
* C++ Compiler = C:\Program\Microsoft Visual Studio .NET 2003\Vc7\bin
* C# and VB.NET compilers = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
* Java =
* Special Output directory = D:\MinaFiler\MinaDokument\OOB\SDKs
* Auto deployment = YES
*
******************************************************************
Microsoft Windows XP Professional Ver. 5.1.2600 Service Pack 3 build 2600 (Swedish)
C++ : Microsoft Visual Studio .NET 2003 ver: 7.1.6030
.NET Framework 1.1 ver. 1.1.4322 SP1
( I notice now that Visual Studio and setsdkenv_windows.bat report different versions of .NET Framework.)
Please don't let me stay with MS Office!