Results 1 to 3 of 3

Thread: Ice E beginners problem

  1. #1
    Kenni is offline Registered User
    Name: Kenni Thomsen
    Organization: SDU Denmark
    Project: Distributed programming with Gumstix
    Join Date
    Nov 2008
    Posts
    2

    Ice E beginners problem

    Hi.

    I have some small beginners problems running IceE programs on a Gumstix with buildroot, I hope someone in here can help me!? I'm building my projects in Ubuntu 8.10 and I have Ice E 1.2.0. I'm quite new to Linux and a totally beginner in Ice-programming.

    I finally got the Ice E demos and tests working on the Gumstix and on Ubuntu, but only when I run the server and client on the same computer. My problem is that when I try to run the ,hello demo or minimal demo, server on Ubuntu and the client on the Gumstix, I get this error:

    ../../src/IceE/Network.cpp:600: Ice::ConnectionRefusedException:
    connection refused: Connection refused

    This is my first and biggest problem but there is more

    How do I compile my own Ice E programs? Is there a guide or something to programming and compiling Ice E?
    At the Ice E download page it says to use the Ice documentation but I can't figure out how to compile Ice E programs? I tried to get something together by combining something from the Ice documentation and the makefiles that comes with Ice E but I only got it to compile the program the linking failed, so I'm doing something wrong. The errors I get has something to do with undefined reference to Ice::Object... and I can see from the makefiles that it might have something to do with linking something before compiling but I can't figure out exactly what to do?
    In the Ice documentation for writing an Ice Application with C++ the slice2cpp is used to create Printer.h and Printer.cpp and I figured that I should use slice2cppe on my Ice E program, but I can't see that the makefiles is using slice2cppe anywhere, so should I use slice2cppe or not?

    First I used slice2cppe on my Hello.ice file and I got the Hello.o file, then I compiled my client program like this:
    arm-linux-c++ -c -I. -I/opt/IceE-1.2.0/include Hello.cpp Client.cpp
    (I get two warnings about comparison always true but I think it doesn't matter at this time)
    And this is how i linked and where it fails:
    arm-linux-c++ -o client Hello.o Client.o -L/home/user/folder/IceE-1.2.0/lib -lIceEC


    The last question is not a problem at this time, but it might become one later.

    Is it possible to run Ice E on a Gumstix running Linux Open Embedded? I have an idea to build Ice E on Ubuntu with static library and try it that way but if anyone had a better way or could say that it wouldn't work, it could save me a lot of trouble.

    Thanks for any help in advance.
    Kenni

  2. #2
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Quote Originally Posted by Kenni View Post
    Hi.

    I have some small beginners problems running IceE programs on a Gumstix with buildroot, I hope someone in here can help me!? I'm building my projects in Ubuntu 8.10 and I have Ice E 1.2.0. I'm quite new to Linux and a totally beginner in Ice-programming.

    I finally got the Ice E demos and tests working on the Gumstix and on Ubuntu, but only when I run the server and client on the same computer. My problem is that when I try to run the ,hello demo or minimal demo, server on Ubuntu and the client on the Gumstix, I get this error:

    ../../src/IceE/Network.cpp:600: Ice::ConnectionRefusedException:
    connection refused: Connection refused

    This is my first and biggest problem but there is more
    If you want to run the demos using different machines then you need to specify the proper hosts in the demo configuration files. For example, for the hello demo you need to edit the Hello.Endpoints property in config.server and the Hello.Proxy in config.client to add a -h paramater. Something like

    Hello.Proxy=hello:tcp -p 10000 -h 192.168.1.1

    of course using whatever ip or hostname is appropriate for your setup.

    Quote Originally Posted by Kenni View Post
    How do I compile my own Ice E programs? Is there a guide or something to programming and compiling Ice E?
    At the Ice E download page it says to use the Ice documentation but I can't figure out how to compile Ice E programs? I tried to get something together by combining something from the Ice documentation and the makefiles that comes with Ice E but I only got it to compile the program the linking failed, so I'm doing something wrong. The errors I get has something to do with undefined reference to Ice::Object... and I can see from the makefiles that it might have something to do with linking something before compiling but I can't figure out exactly what to do?
    In the Ice documentation for writing an Ice Application with C++ the slice2cpp is used to create Printer.h and Printer.cpp and I figured that I should use slice2cppe on my Ice E program, but I can't see that the makefiles is using slice2cppe anywhere, so should I use slice2cppe or not?

    First I used slice2cppe on my Hello.ice file and I got the Hello.o file, then I compiled my client program like this:
    arm-linux-c++ -c -I. -I/opt/IceE-1.2.0/include Hello.cpp Client.cpp
    (I get two warnings about comparison always true but I think it doesn't matter at this time)
    And this is how i linked and where it fails:
    arm-linux-c++ -o client Hello.o Client.o -L/home/user/folder/IceE-1.2.0/lib -lIceEC
    The best guide for compiling is to look at the demo Makefiles that come with Ice-E, or at least to look at the output of the Makefiles to see what they are doing. They definitely do use slice2cppe.

    Either way, the problem in your case is that you are using the client library but did not build your source files using -DICEE_PURE_CLIENT in compiler options when compiling the cpp files. You can either rebuild with that option or link with -lIceE, the full library, instead.

    Quote Originally Posted by Kenni View Post
    The last question is not a problem at this time, but it might become one later.

    Is it possible to run Ice E on a Gumstix running Linux Open Embedded? I have an idea to build Ice E on Ubuntu with static library and try it that way but if anyone had a better way or could say that it wouldn't work, it could save me a lot of trouble.
    We have not tried Ice-E on Linux Open Embedded.

  3. #3
    b33fc0d3 is offline Registered User
    Name: Ahmed Ammar
    Organization: Edge-Technology.com
    Project: PoC
    Join Date
    Sep 2008
    Posts
    4
    Quote Originally Posted by dwayne View Post
    We have not tried Ice-E on Linux Open Embedded.
    I see no reason that OE should be a problem. I use IceE with a gentoo cross-development environment, works fine.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •