Re: isalnum not declared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Nikolai Nezlobin" <nezlobin@xxxxxxxxxxx> writes:

> Hi Ken,
> 
> gcc in my installation does not see iostream.h and other files.  But when
> this project was compiled three years ago, g++ was used.

I am sorry, your description has me completely confused. Note, when
    compiling, 'gcc' cannot correctly link c++ code; you must use
    'g++' - so 'gcc' and 'g++' are two different beasts, even though
    they come in the same package (which as a whole is called 'GCC').

'does not see iostream.h' could mean any number of things:

    (a) The code:
        #include <iostream.h>
        results in an error such as:
        test.cc:1: iostream.h: No such file or directory

        This usually means GCC is incorrectly or incompletely
        installed. One possibility is that only the C compiler ('gcc')
        was installed, and the C++ compiler ('g++') was not.

    (b) code such as:

        #include<iostream>

        int main()
        {
            cout << "Hello world!" << endl;
        }
        results in errors such as:
        incl.cc:5: error: 'cout' was not declared in this scope

        This is becuase C++ 1998 requires cout and endl be called
        'std::cout' and 'std::endl', or that a proper using directives
        such as 'using namespace std;' be used.

    (c) any number of other things.

If you can, please include a short-but-complete code example, which is
    sufficient to cause the problem, and paste (do not summarize) the
    error messages you get.

> Extern C {} might
> solve the problem,

?

Why do you think extern "C" {} has anything to do with your problem? 

> but the project was compiled in 2000 (I have the
> executable file), thus I would really prefer to avoid code modifications (I
> am a physicist, not a programmer).

Did your existing executable suddenly stop working? If it didn't, and
    you aren't a programmer, why are you trying to recompile it?
    (There is nothing wrong with non-programmers recompiling code, but
    when it does not compile, they usually lack the vocabulary and /
    or concepts necessary to describe the problems encountered, or to
    apply the suggestions of people (invariably programmers) trying to
    help.)

> 
> cctype is supposed to see what it is using, isn't it?  Could the paths be
> set incorrectly in my installation, based on this discussion?
> 
> http://os2ports.com/pipermail/ux2bs/Week-of-Mon-20030825/001097.html
> 
> http://os2ports.com/pipermail/ux2bs/Week-of-Mon-20030825/thread.html#1096

Unfortunately, that webmail archive seems to think (wrongly) the message you
    link to starts the thread. I found more of it:
    http://os2ports.com/pipermail/ux2bs/Week-of-Mon-20030825/001085.html
    but I could not find the begining of the thread.

In all the messages I read, there are only error messages; there are
    no code examples, so I can't figure out what is going wrong.

What relation does your problem have to thread? Are you one of the
    participants in the thread? Are you trying to compile the same
    program? 

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux