Hi,
jtzucker wrote:I was wondering if anyone had some pointers to help me get started?
I would like to build a small Omero Client Application in C++ (on Windows) to talk to my Omero Server.
Initially I just wanted to see if I could connect (session) and retrieve an image (pixels).
I have been going over all the documentation on Building Clients, APIs, etc... but do not quite understand the build/development process.
Which pages have you found so far? Did you find
http://trac.openmicroscopy.org.uk/ome/wiki/OmeroCpp? I've updated it with the new URLs for downloads (see below). Obviously, it's more Linux-based, but we'd be interested to work with you to have exemplary Windows info.
In particular
1. Do I need to rebuild a OmeroCpp.dll, .lib ?
Possibly. We have a continuous build running on a 32bit version of Windows Server 2003. Binaries from that build are linked from the OmeroCpp wiki page. The latest build is #467:
http://hudson.openmicroscopy.org.uk/job/OMERO-trunk-components/component=cpp,label=x86-windows/467/What platform are you using? If it varies significantly, you'll need to build yourself. You can do this from the console via the following:
- Code: Select all
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
set ICE_HOME=c:\Ice-3.3.1-VC90
python build.py clean
python build.py build-all
which is taken from
http://git.openmicroscopy.org/?p=ome.git;a=blob;f=docs/hudson/OMERO-cpp.bat;h=6fb8e6d7aeb17012809089fae133859762b09f66;hb=refs/heads/develop which is used by Hudson/Jenkins to perform the integration builds.
2. What includes do I need to include? Location? Ice?
The console build (above; using "python build.py" or "build.bat") should find the Ice includes for you.
However, under the section "Notes for Visual Studio users", there's an alternative. You can run:
- Code: Select all
build -f components\tools\OmeroCpp\build.xml msproj
to generate an VS project file which should include all includes and libraries for you.
3. What libs need to be included? Location?
The same should hold for the libraries. But to be explicit: You need the /lib and /include directores from your %ICE_HOME%. If you are on a 64 bit system, add /lib/x64 before you add /lib. The libraries which you need to link against are "Ice", "IceUtil", and "Glacier2", which is defined in the scons environment at
http://git.openmicroscopy.org/?p=ome.git;a=blob;f=components/blitz/blitz_tools.py;h=ad9b9e523c4e433a1e480644cee1d9f7fd9c32b9;hb=refs/heads/develop#l333. Note: if you are building a debug version, you need to append a "d" to each of those library names.
Once you've built or got the binaries working, then you can go back to following the instructions on OmeroCpp to get a simple Hello World working. If you come up with an NMake or similar build, it'd be great if you could share it back. If you use VS, then you'll need to add the "omero_client" library to your list of libs, and add the OMERO include/ directory to your includes.
Hope that helps. If not, please let us know.
Cheers,
~Josh