This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: isalnum not declared


Please see my comments below.

----- Original Message ----- 
From: <llewelly@xmission.com>
To: "Nikolai Nezlobin" <nezlobin@ece.umn.edu>
Cc: <foskey@optushome.com.au>; "Eljay Love-Jensen" <eljay@adobe.com>;
<gcc-help@gcc.gnu.org>
Sent: Tuesday, June 15, 2004 4:58 AM
Subject: Re: isalnum not declared


| "Nikolai Nezlobin" <nezlobin@ece.umn.edu> 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').

I use g++; I've got an advice to try gcc, but it did not help.  The code is
written in C++.

|
| '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.

In my case g++ works well, gcc has links problems.


|
|     (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.

This error is not my case - I had <iostream.h>.  Let's not use gcc, as the
g++ was the compiler for this project in 2000-2001.

|
| 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.

I am concentrating on this.

|
| > 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.)

My existing executable doesn't give enough digits - I will need very small
changes if I can recompile the project (I have not done any changes yet).
I understand the mathematical part of the code well, but not the part
associated with flex.

|
| >
| > 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.

Thanks you, I will try to provide code examples.

|
| 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?

I started the thread with
http://gcc.gnu.org/ml/gcc-help/2004-06/msg00123.html .

|


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]