Communication with OO in MacOSX

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
Anandh
Posts: 9
Joined: Fri Jan 18, 2013 3:21 pm

Communication with OO in MacOSX

Post by Anandh »

Hi,
I used OpenOffice3.4.1 sdk to build an external dylib in MACOS (it does not add any new types, and is based on the documentLoader example) , which interacts with OpenOffice. Now I'm creating a C++ Console application using Xcode 4.3.3. to communicate with OO from the application. I have included the following directories for Header Search Path in the project settings,
/Applications/OOSDK/OpenOffice.org_SDK/includecpp
/Applications/OOSDK/OpenOffice.org_SDK/idl
/Applications/OOSDK/OpenOffice.org_SDK/include

and Linked with the dylib using Xcode Project Setting's Link Binary with Libraries. While compiling the application code am getting series of following errors from types.h and subsequently from other headers too as i include rtl/process.h in my code.

***ERROR: Could not find 16-bit type, add support for your architecture
***ERROR: Could not find 32-bit type, add support for your architecture
***ERROR: sal_Int32 does not name a type.. etc.. etc...

Am i missing something can anyone help me out to solve this issue. My machine and compiler configuration are,

Mac OS: 10.7.4
Darwin pnmac028.net.plm.eds.com 11.4.0
Arch: x86_64

Available XCode Compiler Information: (tried with both)
Apple LLVM Compiler 3.1
LLVM GCC 4.2

Let me know if you need any other information.

Thanks in advance,
Anandh
Last edited by Anandh on Tue Feb 05, 2013 6:55 am, edited 1 time in total.
Openoffice version 3.4.1
Platform Mac/Windows
User avatar
Charlie Young
Volunteer
Posts: 1559
Joined: Fri May 14, 2010 1:07 am

Re: Communication with OO in MacOSX

Post by Charlie Young »

On Windows, in the header file stdafx.h, you need to add the line

#define WNT

and failure to do so results in errors similar to the ones you are seeing.

There is probably something similar for the Mac

#define MACOS or MACOSX

or some such.
Apache OpenOffice 4.1.1
Windows XP
Anandh
Posts: 9
Joined: Fri Jan 18, 2013 3:21 pm

Re: Communication with OO in MacOSX

Post by Anandh »

Charlie, Thanks for the reply. I have already mentioned MACOS and tried with MACOSX. That doesn't help.
Is there any possibility of getting these error by using inappropriate compiler to link with SDK headers? I tried both Apple LLVM and LLVM GCC comes with Xcode.
Openoffice version 3.4.1
Platform Mac/Windows
Anandh
Posts: 9
Joined: Fri Jan 18, 2013 3:21 pm

Re: Communication with OO in MacOSX

Post by Anandh »

I noticed that, SDK header /include/sal/types.h has entries only for WNT, OS2 and UNX. MACOSX is not defined for various platform specific special handling. This causes series of issues. For writing external program for Mac, user supposed to modify these SDK header on their own? or Do I need to set/alter any settings? Any suggestions and guidance will be helpful.

Thanks / Anandh
Openoffice version 3.4.1
Platform Mac/Windows
Post Reply