Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I am modifying a g++ program for a 2.4.x kernel. The program compiles fine for normal includes such as #include <iostream>. However, the existing program also has #includes <cc++/common.h> ...
  1. #1
    Just Joined!
    Join Date
    Nov 2007
    Posts
    11

    cc++/common.h, cc++socket.h

    Hi,
    I am modifying a g++ program for a 2.4.x kernel. The program compiles fine for normal includes such as #include <iostream>.

    However, the existing program also has #includes <cc++/common.h> and <cc++/socket.h>.

    I assume that the original guy (a former contractor to our company) had a directory called cc++ with these files in them.

    What is the difference between these files and the header files normally included in the default locations such as <iostream>?

    Thanks,
    Keith Stallings

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    The only difference is their content. :)

    Your source is not complete unless you have those. I don't see a way around that.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Just Joined!
    Join Date
    Nov 2007
    Posts
    11
    On my system the defalut c++ include files are in /usr/include/c++/4.1.2 (4.1.2 is the g++ compiler version). This is where iosteam is located.

    The program I am trying to modify uses <cc++/common.h>,<cc++/socket.h>,<cc++/slog.h>. It is a program that involves syslog and sockets. Should these header files be on my Redhat interprise 5 desktop.

    Are these standard header files that someone would know about when using sockets??

    Thanks,
    Keith Stallings

  4. #4
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192

    Plea for help

    It occurred to me just now that when you say
    I am modifying a g++ program for a 2.4.x kernel.
    you mean you're starting out with a program that compiles fine on a system with a 2.6 kernel. Sorry about coming up to speed so slowly.

    So. Will anyone who has both a 2.6 system and a 2.4 system please step up to the plate? I have only a 2.4 system.

    In the meantime, please be patient as I try to fake being useful here.

    You have three separate situations: socket.h, slog.h, and common.h.

    On your 2.4 system, instead of including <c++/socket.h>, try including <sys/types.h> and <sys/socket.h>. I'm guessing that this will work fairly smoothly.

    Also on your 2.4 system, instead of including <c++/slog.h>, try including <syslog.h>. This will probably work smoothly, but you may have system logging stuff that now needs to be compiled differently. If so, the compiler will let you know. If so, do a
    Code:
    man syslog
    on your 2.4 system and see if that helps. If it doesn't, come back here.

    But the <c++/common.h> throws me for a loop. How large is that file? Is it reasonable to ask you to post the whole .h file here?

    If you do, please please PLEASE put it between code markers, because Linux .h files can sometimes be hugely unreadable.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Postscript:

    I know you didn't mean it, but I'm rather fond of your word "defalut". Say it ten times fast. I may use it when I cross over into l33t5peeq, if you don't mind. :)
    --
    Bill

    Old age and treachery will overcome youth and skill.

  6. #6
    Just Joined!
    Join Date
    Nov 2007
    Posts
    11
    Thanks for everyones help. I found that the files are part of what is called the "GNU Common C++ Framework". It is not normally part of a Linux Distro and has to be installed.

    Thanks again,
    Keith Stallings

Posting Permissions

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