Beginner question....

in Help Center
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
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
0
Comments
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
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.