Hi Ariel,

     This is really worth a lot of information for me.. Thanks to you for
the valuable information. I ran the processtest sample also as a root user.

My C++ client application using Xcode, and I was running the client
application directly, I didn't use unoapploader before.
But if i use unoapploader (as the way u suggested ), and while Running
VerificationOO from terminal (where setsdkenv_unix had run already), OO
launches. :) This is good news for me. But I couldn't run/debug the
application from Xcode - I may need to check how to setting URE libs from
my client application.

     So, running the client application in using unoapploader solves the
issue now. But actually, i guess i need to use with ustrEnviroments and
nEnvironmentVars otherwise. Am i right?

Thanks for the guidance,
Anandh


On Thu, Feb 21, 2013 at 6:32 PM, Ariel Constenla-Haile
<arie...@apache.org>wrote:

> Hi Anandha,
>
> On Thu, Feb 21, 2013 at 04:49:26PM +0530, Anandha Kannan wrote:
> > Hi Ariel,
> >
> >     Thanks for the quick reply. To answer your questions..
> >
> >  + I am able to launch open office from Terminal without any issues. But
> > not from my application.
> >  + My application is linked with a library myoocalc.dylib (from which
> > osl_executeprocess is being called.) and libuni_ccpu.dylib.3,
> > libuno_cppuhelpergcc3.dylib.3, libuno_sal.dylilb.3, etc..
> >     ++ The all dynamic libraries are located at
> > /Volumes/data/OpenOffice.org_SDK/OpenOffice.org_SDK/MACOSXexample.out/lib
> >     ++ My application calls a myoocalc.dylib's method which calls
> > osl_executeprocess method
> >  + Am running my application as root user.
>
> This might be the root of the problem.
>
> >  + The sample code u sent works fine..
>
> Did you run the example as root, too?
>
> > Am not sure whether i'm doing anything incorrect here with linking my
> > application with dylib which invokes OO.
>
> When you develop a C++ client application, the application is launched
> indirectly, through the unoapploader:
>
> - your application binary is renamed to _<yourapp>
> - the unoapploader from the SDK is copied aside your application and
>   renamed <yourapp>
>
> The UNO application loader detects a UNO installation on the system and
> adds some variables to the environment, see the comment in
>
> http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/odk/source/unoapploader/unx/unoapploader.c
>
> Your library is linked to the URE libraries, but your executable not;
> this is right, if the executable in itself does not need linking to
> them. But how are you executing your executable? Directly, or through
> the UNO application loader?
>
> If you are not using the unoapploader, try it and see if it fixes the
> problem (take the unoapploader from the SDK instalation and copy it in
> the same directory where your executable is; rename your executable,
> adding an underscore at the beginning, and rename the unoapploader with
> the original name of your application).
>
> If you want to avoid using the UNO application loader, you can set the
> environment in the call to osl_executeProcess(), it has two parameters:
> ustrEnviroments and nEnvironmentVars (I'd point you to the online
> documentation, but there is a bug in autodoc, and the doc for
> /sdk/include/osl/process.h is not generated
>
> http://www.openoffice.org/api/docs/cpp/ref/names/o-process.h.html#osl_executeProcess-752
> ).
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>

Reply via email to