Results 1 to 6 of 6

Thread: Getting started

  1. #1
    Iain is offline Registered User
    Name: Iain Buchanan
    Organization: Personal
    Project: Python/QT/C++ calculator
    Join Date
    Aug 2011
    Posts
    4

    Getting started

    I've downloaded and installed Ice-3.4.2 and created the demo programs in Python 2.6. These work perfectly. I then built the C++ sample from the manual using Visual Studio 2010 running under Windows 7 (64-bit) and tried to run that. I've got two problems:
    1. The line below gives me an access violation. Moving the value to a temporary fixes the issue (I'm using the debug heap):
      Code:
      adapter->add(object, ic->stringToIdentity("SimplePrinter"));
    2. After fixing the above I can then start the server and client, but I get an OperationNotExistException in the generated Printer.cpp file:
      Code:
      ::Ice::DispatchStatus
      Demo::Printer::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
      {
          ::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__Demo__Printer_all, __Demo__Printer_all + 5, current.operation);
          if(r.first == r.second)
          {
              throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
          }
      The current operation appears to be an empty string, and it is failing on the client's checked cast. The same thing happens if I try connecting the Python client to the C++ server.
    I'm building a 32-bit application, linking against the 32-lib libraries in the "vc100" subfolder (the main folder gives the same result).

    Has anyone had a similar problem, or know what the solution is?

  2. #2
    mes's Avatar
    mes
    mes is online now ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Iain,

    Welcome to the forum.

    Are you sure you're linking with the debug version of the Ice libraries? See this FAQ for more information.

    Cheers,
    Mark

  3. #3
    Iain is offline Registered User
    Name: Iain Buchanan
    Organization: Personal
    Project: Python/QT/C++ calculator
    Join Date
    Aug 2011
    Posts
    4
    Thanks Mark - that was the problem. I've now got what looks like a VC runtime mismatch, but should be able to sort that out this evening.

    Thanks again for the quick reply.

  4. #4
    Iain is offline Registered User
    Name: Iain Buchanan
    Organization: Personal
    Project: Python/QT/C++ calculator
    Join Date
    Aug 2011
    Posts
    4
    I've got the demo working. For the benefit of anyone else with the same issue:

    • match the version of the Visual Studio runtime brought in via ZeroC libs with your VS version (use dependency walker if need be to check). VS 2010 libs are in "vc100" subfolder of lib.
    • this extends to DLLs - check which you are loading at runtime from the path - make sure that you've got the "ice-3.4.2/bin/vc100" folder rather than "ice-3.4.2/bin" if you're using VS 2010.

    This is definitely a VS problem rather than a ZeroC issue, but it might be helpful to put a note about VS runtime versions in the C++ demo section of the manual to help any other similarly clueless people?

  5. #5
    mes's Avatar
    mes
    mes is online now ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi Iain,

    We do describe how to configure your environment in the Using the Windows Binary Distribution of the release notes.

    Glad to hear the demo's working for you now.

    Take care,
    Mark

  6. #6
    Iain is offline Registered User
    Name: Iain Buchanan
    Organization: Personal
    Project: Python/QT/C++ calculator
    Join Date
    Aug 2011
    Posts
    4
    Ah, my fault for not reading it properly. Thanks for your help!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. getting started with java ice using eclipse
    By onanar in forum Help Center
    Replies: 6
    Last Post: 07-23-2009, 01:27 AM
  2. Getting started with ICE for silverlight
    By JvD in forum Help Center
    Replies: 6
    Last Post: 12-19-2008, 06:42 AM

Tags for this Thread

Posting Permissions

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