Page 1 of 1

OMERO C++ API

PostPosted: Wed Feb 13, 2013 4:51 pm
by jerome
Hi all,

I am trying to get my software (www.volviewer.org) updated to the latest OMERO Cpp API / 4.4.x.
Does anyone have VS2010 pre-compiled libraries? x64 or x86?

This would save me a lot of time.
Thanks in advance for your help.

Jerome.

Re: OMERO C++ API

PostPosted: Thu Feb 14, 2013 3:53 pm
by jessec
Jerome,

I've built an OMERO C++ 4.4.6 binary for Windows x86. You can download it at the following link.
http://cvs.openmicroscopy.org.uk/snapshots/omero/4.4.6/OMERO.cpp-4.4.6-win32-cl-10.0Exp-32rel.zip

Re: OMERO C++ API

PostPosted: Thu Feb 14, 2013 4:35 pm
by jerome
Thanks Jessec!
Greatly appreciated...

Quick question is this built against ICE 3.4.2?

Secondly for fun, :), I'm trying to build the x64 libraries, with VS2010 and ICE 3.4.2
Server built fine btw...

build-cpp fails with the following:

Building with ICE_HOME=C:\Program Files (x86)\ZeroC\Ice-3.4.2
Debug setting: True (debug)
64-Bit build: True (x64)
Compiling src\omero\sys\ParametersI.obj
ParametersI.cpp
C:\Program Files (x86)\ZeroC\Ice-3.4.2\include\IceUtil/Handle.h(168) : error C22
49: 'IceInternal::GCShared::__incRef' : no accessible path to private member declared in virtual base 'omero::sys::Parameters'
C:\Program Files (x86)\ZeroC\Ice-3.4.2\include\Ice/GCShared.h(33) : see declaration of 'IceInternal::GCShared::__incRef'
D:\Development\XXX\Personal\JIC\OMERO\ome\components\tools\OmeroCpp\target\omero/System.h(1815) : see declaration of 'omero::sys::Parameters'
C:\Program Files (x86)\ZeroC\Ice-3.4.2\include\IceUtil/Handle.h(162) : while compiling class template member function 'IceUtil::Handle<T>::Handle(T *)'
with
[
T=omero::sys::ParametersI
]
src\omero\sys\ParametersI.cpp(30) : see reference to class template instantiation 'IceUtil::Handle<T>' being compiled
with
[
T=omero::sys::ParametersI
]
scons: *** [src\omero\sys\ParametersI.obj] Error 2

Any ideas?
Thanks,

J.

Re: OMERO C++ API

PostPosted: Thu Feb 14, 2013 4:51 pm
by jerome
Ignore the first question, just spotted the logs it's built with ICE 3.4.2 in release mode.

Though any help with my build-cpp error is still appreciated.

thanks,
J.

Re: OMERO C++ API

PostPosted: Thu Feb 14, 2013 4:54 pm
by rleigh
The error looks like another instance of the Ice 3.4 IceUtil::Handle<> breakage. Jerome, if you've not run into this yet, the Ice 3.4.x and 3.5 beta releases broke the implementation of IceUtil::Handle, and this error message is indicative of that. omero::sys::ParametersIPtr being constructed on the return of ParametersI::noPage looks to be the culprit.

The problem is that __incRef is in not one, but two separate base classes, and the compiler can't deal with the abiguity (correctly).

If you look in the ParametersI.h source file, you'll see we've added conditionals to use either IceUtil::Handle where working (3.3) or IceInternal::Handle where broken (3.4.x). The interesting bit here being that you're getting an IceUtil::Handle where you should be getting an IceInternal::Handle if you're using ice 3.4.x. Might be worth checking what ICE_INT_VERSION from IceUtil/Config.h is, and if your include paths are using the correct headers in case it's picking up 3.3 headers for some reason.

Regards,
Roger

Re: OMERO C++ API

PostPosted: Thu Feb 14, 2013 5:16 pm
by jerome
Thanks Roger,

My ICE_INT_VERSION is 30402
I have no other version of ICE on this machine.

In my ParametersI.h I dont see any conditional statememts to switch between IceUtil::Handle and the 3.4.x compatible IceInternal::Handle. Only IceUtil::Handle is ever called in the header.

So maybe we need to take a step back here :) How do I check I have the correct 4.4.6 git branch. Fist time I use git so not 100% sure about the step I took.
When I run

git checkout v.4.4.6

It does tell me

Already on v.4.4.6

So guessing that's setup ok no?

Thanks,
J.

Re: OMERO C++ API

PostPosted: Thu Feb 14, 2013 5:45 pm
by rleigh
ICE_INT_VERSION where is fine (3.4.2), and v.4.4.6 is the correct tag to check out. With this checkout, components/tools/OmeroCpp/src/omero/sys/ParametersI.h should have

Code: Select all
#if ICE_INT_VERSION / 100 >= 304
        typedef IceInternal::Handle<ParametersI> ParametersIPtr;
#else
        typedef IceUtil::Handle<ParametersI> ParametersIPtr;
#endif


so this should result in you getting ParametersIPtr typedefed as an IceInternal::Handle<> type.

If you don't have the above conditional, then there's something wrong with the checkout.


Regards,
Roger

Re: OMERO C++ API

PostPosted: Thu Feb 14, 2013 7:33 pm
by jerome
Something is wrong with my checkout then...
I'll try again and let you know how it goes.

J.