To get a handle on the problem, I took a step back and tried to compile and run the DocumentLoader example that comes with the SDK. It too failed to compile successfully. I suspect that if I can resolve the issues with the DocumentLoader example I will solve the problems I am having with our application.
I am working on a Window XP machine and using Visual Studio 2005 (VC 8.0). Here are the environment setting that are made when I run the setsdkenv_windows.bat before building the DocumentLoader example:
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
******************************************************************
*
* SDK environment is prepared for Windows
*
* SDK = C:\Program Files\OpenOffice.org_2.4_SDK
* Office = C:\Program Files\OpenOffice.org 2.4
* URE =
* Make = C:\mingw\bin
* Zip = c:\gzip
* C++ Compiler = C:\Program Files\Microsoft Visual Studio 8\VC\bin
* C# and VB.NET compilers = C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
* Java = C:\Program Files\Java\jre1.6.0_05
* Special Output directory = c:\temp
* Auto deployment = YES
*
******************************************************************
Here is the output generated in the command prompt during the DocumentLoader project make:
../../../config.guess: not found
mkdir c:\\temp\\OpenOffice.org_2.4_SDK\\WINexample.out\\bin
mkdir: directory "c:\temp\OpenOffice.org_2.4_SDK\WINexample.out\bin": Cannot create a file when that file already exists.
mingw32-make: [c:/temp/OpenOffice.org_2.4_SDK/WINexample.out/bin/DocumentLoader.rdb] Error 1 (ignored)
del c:\temp\OpenOffice.org_2.4_SDK\WINexample.out\bin\DocumentLoader.rdb
process_begin: CreateProcess((null), del c:\temp\OpenOffice.org_2.4_SDK\WINexample.out\bin\DocumentLoader.rdb, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: [c:/temp/OpenOffice.org_2.4_SDK/WINexample.out/bin/DocumentLoader.rdb] Error 2 (ignored)
"C:\Program Files\OpenOffice.org_2.4_SDK/windows/bin/regmerge" c:/temp/OpenOffice.org_2.4_SDK/WINexample.out/bin/DocumentLoader.rdb / "C:\Program Files\OpenOffice.org 2.4\program\types.rdb"
mkdir c:\\temp\\OpenOffice.org_2.4_SDK\\WINexample.out\\misc
mkdir: directory "c:\temp\OpenOffice.org_2.4_SDK\WINexample.out\misc": Cannot create a file when that file already exists.
mingw32-make: [c:/temp/OpenOffice.org_2.4_SDK/WINexample.out/misc/cpp_DocumentLoader_types.flag] Error 1 (ignored)
del c:\temp\OpenOffice.org_2.4_SDK\WINexample.out\misc\cpp_DocumentLoader_types.flag
process_begin: CreateProcess((null), del c:\temp\OpenOffice.org_2.4_SDK\WINexample.out\misc\cpp_DocumentLoader_types.flag, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: [c:/temp/OpenOffice.org_2.4_SDK/WINexample.out/misc/cpp_DocumentLoader_types.flag] Error 2 (ignored)
"C:\Program Files\OpenOffice.org_2.4_SDK/windows/bin/cppumaker" -Gc -BUCR -Oc:/temp/OpenOffice.org_2.4_SDK/WINexample.out/inc/DocumentLoader -Tcom.sun.star.lang.XMultiServiceFactory -Tcom.sun.star.lang.XComponent -Tcom.sun.star.beans.XPropertySet -Tcom.sun.star.bridge.XUnoUrlResolver -Tcom.sun.star.frame.XComponentLoader -Tcom.sun.star.lang.XMultiComponentFactory -Tcom.sun.star.container.XHierarchicalNameAccess -Tcom.sun.star.registry.XSimpleRegistry c:/temp/OpenOffice.org_2.4_SDK/WINexample.out/bin/DocumentLoader.rdb
echo flagged > c:/temp/OpenOffice.org_2.4_SDK/WINexample.out/misc/cpp_DocumentLoader_types.flag
mkdir c:\\temp\\OpenOffice.org_2.4_SDK\\WINexample.out\\obj\\DocumentLoader
cl -c -MT -Zm500 -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa -Zc:wchar_t- -I. -Ic:/temp/OpenOffice.org_2.4_SDK/WINexample.out/inc/examples -I../../../include -Ic:/temp/OpenOffice.org_2.4_SDK/WINexample.out/inc/DocumentLoader -DWIN32 -DWNT -DCPPU_ENV=msci -Foc:\\temp\\OpenOffice.org_2.4_SDK\\WINexample.out\\obj\\DocumentLoader\\DocumentLoader.obj DocumentLoader.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
DocumentLoader.cxx
DocumentLoader.cxx(91) : error C2027: use of undefined type 'com::sun:
../../../include\cppuhelper/bootstrap.hxx(57) : see declaration of 'com::sun:
DocumentLoader.cxx(91) : error C2039: 'open' : is not a member of 'com::sun:
with
[
interface_type=com::sun:
]
DocumentLoader.cxx(109) : error C2065: 'XMultiComponentFactory' : undeclared identifier
DocumentLoader.cxx(110) : error C2027: use of undefined type 'com::sun:
../../../include\cppuhelper/bootstrap.hxx(58) : see declaration of 'com::sun:
DocumentLoader.cxx(110) : error C2039: 'getServiceManager' : is not a member of 'com::sun:
with
[
interface_type=com::sun:
]
DocumentLoader.cxx(110) : error C2514: 'com::sun:
../../../include\com/sun/star/uno/Reference.h(192) : see declaration of 'com::sun:
DocumentLoader.cxx(116) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'com::sun:
../../../include\com/sun/star/uno/Reference.h(372): could be 'interface_type *com::sun:
while trying to match the argument list '(com::sun:
DocumentLoader.cxx(116) : error C2039: 'createInstanceWithContext' : is not a member of 'com::sun:
../../../include\com/sun/star/uno/Reference.h(192) : see declaration of 'com::sun:
DocumentLoader.cxx(142) : error C2027: use of undefined type 'com::sun:
../../../include\cppuhelper/bootstrap.hxx(58) : see declaration of 'com::sun:
DocumentLoader.cxx(142) : error C2039: 'getServiceManager' : is not a member of 'com::sun:
with
[
interface_type=com::sun:
]
DocumentLoader.cxx(142) : error C2514: 'com::sun:
../../../include\com/sun/star/uno/Reference.h(192) : see declaration of 'com::sun:
DocumentLoader.cxx(148) : error C2678: binary '->' : no operator found which takes a left-hand operand of type 'com::sun:
../../../include\com/sun/star/uno/Reference.h(372): could be 'interface_type *com::sun:
while trying to match the argument list '(com::sun:
DocumentLoader.cxx(148) : error C2039: 'createInstanceWithContext' : is not a member of 'com::sun:
../../../include\com/sun/star/uno/Reference.h(192) : see declaration of 'com::sun:
mingw32-make: *** [c:/temp/OpenOffice.org_2.4_SDK/WINexample.out/obj/DocumentLoader/DocumentLoader.obj] Error 2
As you can see there are a number of errors generated when the DocumentLoader.cxx file is compiled. Any idea what is causing these errors? The DocumentLoader example compiles without problem with the 2.1 SDK using the same compiler.