Home Help Center

Beginner question....

titustitus Member Titus PurdinOrganization: University of ArizonaProject: Large Binocular Telescope
I tried to compile the 'Hello' example from the 'demo' directory (C++)
without using the supplied Makefile. That is, I wanted to compile it
piece at a time. Eventually, I got simple errors such as

`callbackOnInterrupt' was not declared in this scope

Okay, but 'callbackOnInterrupt is not even mentioned in the 'book'
(which has no index). Where are the 'man page' facilities to help folk
like me get up to speed? I'm trying to avoid executing Makefiles that
include other Makefiles---but do work---so that I can go 'Wow!". I would
prefer to understand what is going on.

Thanks to anyone willing to tackle such a beginner question and help
get me into the stream.....


Titus sends

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Indexes are not really necessary for media such as PDF's that can be searched. Searching for callbackOnInterrupt yields 10 occurrences, the first being on page 264:
    namespace Ice { 
      class Application:/*...*/{ 
      public: 
        //... 
        static void destroyOnInterrupt(); 
        static void shutdownOnInterrupt(); 
        static void ignoreInterrupt(); 
        static void callbackOnInterrupt(); 
        static void holdInterrupt(); 
        static void releaseInterrupt(); 
        static bool interrupted(); 
        virtual void interruptCallback(int); 
      }; 
    }
    
  • titustitus Member Titus PurdinOrganization: University of ArizonaProject: Large Binocular Telescope
    More to the point....

    Thanks, Matthew. I appreciate your point about pdf's. Try looking for it in
    version 3.1.1 of the 'book', however. But my larger (and hopefully more
    important) point is not about indexes. I have downloaded the 3.2.1 version
    of the 'book'. And I will look at it to see if my question is answered therein.

    My real issue is about being able to understand what include files and what
    libraries are necessary for a particular build. The example I used in my
    earlier message was the Hello program from the (C++) demos package. It
    compiles fine if I use your Makefile(s). I just couldn't seem to conjure up a
    working Makefile of my own from scratch.

    Titus sends
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    The API in question was added in Ice 3.2 so its not surprising you don't find it in any Ice 3.1 series book (the CHANGES file contains a list of all changes from version to version).

    We do not explicitly document the inclusion rules for C++. However, they are pretty simple:

    - All Ice applications must include <Ice/Ice.h>
    - If you use anything explicitly from IceUtil you must also include <IceUtil/IceUtil.h>
    - You must always link every application that uses the Ice runtime with -lIce -lIceUtil.
    - If you use other Ice components (such as Glacier2, Freeze, etc) then you have to include the appropriate component and link with the appropriate library. See the demos to work out what the correct include and library are.

    In addition to this there are also requirements on the required compiler flags and operating system libraries that must be linked. Again, the best way to work out what these are is to look at what occurs when you compile the demos.
Sign In or Register to comment.