[ome-devel] Building OmeroCpp

James Perry jamesp at epcc.ed.ac.uk
Tue Sep 30 11:42:45 BST 2008


Hi Josh,

>  > and reverse the order of the common and client libraries in the
>  > makefile to get rid of hundreds of linker errors due to client
>  > depending on lots of things from common.
>
> Hmmm...that's an interesting one. I've never had an issue with that,
> nor could I reproduce it just now. You may have already sent it, but
> would you mind telling us your OS info again along with your version
> of make and your compiler.

It's Fedora Core 5 with g++ 4.1.0 and Make 3.80.

>  > I'm still getting one linker
>  > error:
>  >
>  > g++ -o omerotest omerotest.o -L/home/digs/trunk/dist/lib
>  > -L/home/digs/Ice/lib -lIce -lIceUtil -lGlacier2 -lOMERO_client
>  > -lOMERO_common -lstdc++
>  > /home/digs/trunk/dist/lib/libOMERO_client.a(ObjectFactoryRegistrar.o):
>  > In function `omero::ObjectFactory::create(std::basic_string<char,
>  > std::char_traits<char>, std::allocator<char> >
>  > const&)':ObjectFactoryRegistrar.cpp:(.text+0xd16f): undefined
>  > reference to `omero::model::CommentAnnotationI::CommentAnnotationI()'
>  > collect2: ld returned 1 exit status
>  > make: *** [omerotest] Error 1
>  >
>  > Any ideas what might be causing it?
>
> Yes. Unfortunately, I do. The autoconf configuration requires all new
> code-generated objects to be added (redundantly).  CommentAnnotation
> wasn't. The simplest fix for you to finish testing is to add
> CommentAnnotation.cpp and CommentAnnotationI.cpp to your build:
>
> $ cp   
> ../../components/tools/OmeroCpp/src/slice_generated/omero/model/CommentAnnotation.cpp   
> .
> $ cp   
> ../../components/tools/OmeroCpp/target/temp/omero/model/CommentAnnotationI.cpp   
> .
>
> and change:
>
> yourcode.o: yourcode.cpp  -->   %.o: %.cpp
> yourcode: yourcode.o  --->  yourcode: yourcode.o CommentAnnotation.o  
>  CommentAnnotationI.o

Thanks, that fixes it. It builds now.

Cheers,
James


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




More information about the ome-devel mailing list