Home Help Center

Freeze runtime error

ngambek2003ngambek2003 Member Budyanto HimawanOrganization: WMS Inc.Project: Casino back end services ✭✭
Hi,

I'm just trying out Freeze in my service and I'm getting the following error at runtime
09/29/09 14:43:08.793 CIceBoxServer2: error: ServiceManager: unable to load entry point `RngSvcI:create': /opt/ice/services/libRngSvcI.so: undefined symbol: _ZN11IceInternal6upCastEPN6Freeze10Connection.

Am I missing some shared libraries?

Thanks
Budyanto

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Budyanto,

    You only need to link with Freeze library to use Freeze

    If this not solve your issue, could you give us some more info? your compiler, Ice version , operating systems, and the command line use to link your service

    Regards,
    José
  • ngambek2003ngambek2003 Member Budyanto HimawanOrganization: WMS Inc.Project: Casino back end services ✭✭
    Here's the info.

    Compiler: gcc version 4.1.2 20080704
    Ice version: 3.3.1-1
    OS: CentOS 5
    Command line used to link: g++ -shared -lFreeze objs/Rng.o objs/rng.o objs/RngI.o objs/RngSvcI.o -o dist/libRngSvcI.so

    Thanks
    Budyanto
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Budyanto,

    You need to compile code with -fPIC see our demos as example of gcc options used to build the application
    c++ -c -I. -I../../../include  -ftemplate-depth-128 -Wall -D_REENTRANT -I/usr/include/nptl -fPIC -g  HelloServiceI.cpp
    rm -f libHelloService.so
    c++ -shared -Wl,--enable-new-dtags -Wl,-rpath,/opt/Ice-3.4b/lib -rdynamic  -ftemplate-depth-128 -Wall -D_REENTRANT -I/usr/include/nptl -fPIC -g  -L../../../lib  -o libHelloService.so -Wl,-h,libHelloService.so   Hello.o HelloI.o HelloServiceI.o -lIceBox  -lIce -lIceUtil -lFreeze -lpthread -lrt
    
    

    I have tested this with cpp/demo/IceBox/hello of the Ice distribution modified to create a Freeze env and connection on service start and it works

    Hope this help,
    José
  • ngambek2003ngambek2003 Member Budyanto HimawanOrganization: WMS Inc.Project: Casino back end services ✭✭
    That is it!

    I had the -fPIC flag on the compile but not on the link. Thanks again.

    Budyanto
Sign In or Register to comment.