• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • Start Page
  • Index
  • History
  • Last Change

Building the OmeroCpp libraries

OmeroCpp is included as a component of OmeroTools. See the instructions there on how the build works. What will be produced by that build are two sets of artifacts:

  • OMERO_HOME/dist/include contains C++ header files as well as the slice files from which the Ice-based model is generated.
  • OMERO_HOME/dist/lib contains the shared library files libOMERO_*.so, in 32 or 64-bit mode depending on your CXXFLAGS (See OmeroTools)

Using the OmeroCpp libraries

To use OmeroCpp it is necessary to point your compiler at the mentioned directories above. A simple Makefile might look like this:

# Where the OMERO distribution was installed
OMERO_DIST?=/opt/omero

# Where the Ice lib/ and include/ directories are to be found
ICE_HOME?=/usr

INCLUDES=-I$(OMERO_DIST)/include -I$(ICE_HOME)/include 

LIBS=-L$(OMERO_DIST)/lib -L$(ICE_HOME)/lib -L$(ICE_HOME)/lib64 \
     -lIce -lIceUtil -lGlacier2 -lOMERO_common -lOMERO_client -lstdc++

LIBPATH=$(LD_LIBRARY_PATH):$(ICE_HOME)/lib:$(ICE_HOME)/lib64:$(OMERO_DIST)/lib

.PHONY: clean run

yourcode.o: yourcode.cpp
        $(CXX) $(CXXFLAGS) -c -o $@ $< $(INCLUDES)

yourcode: yourcode.o
        $(CXX) -o $@ $^ $(LIBS)

run:  yourcode
        LD_LIBRARY_PATH="$(LIBPATH)" ./yourcode --Ice.Config=../etc/ice.config

clean:
        rm -f yourcode *.o *~ core 

Download in other formats:

  • Plain Text

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/