Re: isalnum not declared CODE

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

 



Dear All,

This is the short version of the code that produces the isalnum error.  The
files (agstring.h, CType.h, main.cc, makefile, makefile.common) and two
error messages (for the short code and for the whole project) are below.

All files, except for makefile.common, were in /mnt/hdb1/Sour/CType. The
line top=/mnt/hdb1/Sour in makefile reflects this. You will need to change
the top= if you try to compile the code.
makefile.common was kept one level upper (in /mnt/hdb1/Sour)

Thanks,
Nikolai

****************mnt/hdb1/Sour/CType/agstring.h******************************
**
// This may look like C code, but it is really -*- C++ -*-
/*
Copyright (C) 1988 Free Software Foundation
    written by Doug Lea (dl@xxxxxxxxxxxxxxxx)
*/

#ifndef _String_h
#define _String_h 1
#include <iostream.h>
#undef OK
#define INLINE

struct StrRep                     // internal String representations
{
  unsigned short    len;
  unsigned short    sz;
  char              s[1];
};

class String
{
protected:
  StrRep*           rep;   // Strings are pointers to their representations
public:
                    String();
                    String(const char* t);
                    ~String();
  String&           operator =  (const char* y);
  friend INLINE ostream&   operator<<(ostream& s, const String& x);
};
INLINE ostream& operator<<(ostream& s, const String& x);
#endif


******************mnt/hdb1/Sour/CType/CType.h*******************************
****
#ifndef CType_h
#define CType_h
#include "agstring.h"
typedef enum { C_Node_Phi=0} CType;
const int CType_num=1;
const String CType_string[CType_num]={"Node_Phi"};
#endif


*********************mnt/hdb1/Sour/CType/main.cc****************************
****
#include "CType.h"
#include "agstring.h"
int main(){
for(int i=0;i<CType_num;i++)
cout << i << " " << CType_string[i] << endl;
}


**********************mnt/hdb1/Sour/CType/makefile**************************
*****
top=..
top_relative:=$(top)
CC=$(CXX)
CFLAGS=-g -v -Wall
DEPENDFLAG=-MMD
LD=$(CXX)
LDFLAGS=-g -v -Wall
LDLIBS=-lm
top=/mnt/hdb1/Sour
cty_dir = $(top)/CType
cty_objs=$(addprefix $(cty_dir)/,agstring.o)
dep_dir = $(cty_dir)
my_target=try
my_objs = main.o
#INCLUDE=$(addprefix -I,$(dep_dir))
INCLUDE=
empty:=
collon:= :
space:= $(empty) $(empty)
export CPLUS_INCLUDE_PATH:=$(subst $(space),$(collon),$(dep_dir))
include $(top)/Makefile.common


**********************mnt/hdb1/Sour/makefile.common*************************
******
my_objs_relative:=$(strip $(subst $(top),$(top_relative),$(my_objs)))
all:
$(MAKE) $(my_target)
$(my_target): $(my_objs)
$(LD) $(LDFLAGS) -o $@ $(my_objs_relative) $(LDLIBS)


***************Error Message for the Short Code*******************
root@nezlobin:/mnt/hdb1/Sour/CType# make
make try
make[1]: Entering directory `/mnt/hdb1/Sour/CType'
g++ -c -o main.o main.cc
In file included from /usr/include/c++/3.2.3/backward/iostream.h:31,
from agstring.h:9,
from CType.h:4,
from main.cc:1:
/usr/include/c++/3.2.3/backward/backward_warning.h:32:2: warning: #warning
This file includes at least one deprecated or antiquated header. Please
consider using one of the 32 headers found in section 17.4.1.2 of the C++
standard. Examples include substituting the <X> header for the <X.h> header
for C++ includes, or <sstream> instead of the deprecated header
<strstream.h>. To disable this warning use -Wno-deprecated.
In file included from /usr/include/c++/3.2.3/bits/localefwd.h:48,
from /usr/include/c++/3.2.3/ios:48,
from /usr/include/c++/3.2.3/ostream:45,
from /usr/include/c++/3.2.3/iostream:45,
from /usr/include/c++/3.2.3/backward/iostream.h:32,
from agstring.h:9,
from CType.h:4,
from main.cc:1:
/usr/include/c++/3.2.3/cctype:68: `isalnum' not declared
/usr/include/c++/3.2.3/cctype:69: `isalpha' not declared
/usr/include/c++/3.2.3/cctype:70: `iscntrl' not declared
/usr/include/c++/3.2.3/cctype:71: `isdigit' not declared
/usr/include/c++/3.2.3/cctype:72: `isgraph' not declared
/usr/include/c++/3.2.3/cctype:73: `islower' not declared
/usr/include/c++/3.2.3/cctype:74: `isprint' not declared
/usr/include/c++/3.2.3/cctype:75: `ispunct' not declared
/usr/include/c++/3.2.3/cctype:76: `isspace' not declared
/usr/include/c++/3.2.3/cctype:77: `isupper' not declared
/usr/include/c++/3.2.3/cctype:78: `isxdigit' not declared
/usr/include/c++/3.2.3/cctype:79: `tolower' not declared
/usr/include/c++/3.2.3/cctype:80: `toupper' not declared
In file included from /usr/include/c++/3.2.3/bits/locale_facets.h:63,
from /usr/include/c++/3.2.3/bits/basic_ios.h:41,
from /usr/include/c++/3.2.3/ios:51,
from /usr/include/c++/3.2.3/ostream:45,
from /usr/include/c++/3.2.3/iostream:45,
from /usr/include/c++/3.2.3/backward/iostream.h:32,
from agstring.h:9,
from CType.h:4,
from main.cc:1:
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:44: `_ISupper'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:45: `_ISlower'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:46: `_ISalpha'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:47: `_ISdigit'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:48:
`_ISxdigit'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:49: `_ISspace'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:50: `_ISprint'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:51: `_ISgraph'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:52: `_IScntrl'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:53: `_ISpunct'
was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:54: `_ISalnum'
was not declared in this scope
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/mnt/hdb1/Sour/CType'
make: *** [all] Error 2

***************Error Message for the Whole Project*******************
root@nezlobin:/mnt/hdb1/Source/src# make
make st
make[1]: Entering directory `/mnt/hdb1/Source/src'
cd /mnt/hdb1/Source/src/Parser && \
g++ -g -v -Wall -MMD parser.tab.c -c -o parser.tab.o
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/specs
Configured with:
../gcc-3.2.3/configure --prefix=/usr --enable-shared --enable-threads=posix 
--enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i4
86-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.2.3
 /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/cc1plus -v -MMD
parser.tab.d -MQ
parser.tab.o -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX
_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix
__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLI
NE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__
i386 -D__i386__ -D__tune_i486__
parser.tab.c -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase
parser.tab.c -g -Wall -version -o /tmp/ccDVr3jc.s
GNU CPP version 3.2.3 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2.3 (i486-slackware-linux)
        compiled by GNU C version 3.2.3.
ignoring nonexistent directory "/usr/i486-slackware-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /mnt/hdb1/Source/src/CType
 /mnt/hdb1/Source/src/Node
 /mnt/hdb1/Source/src/Edge
 /mnt/hdb1/Source/src/Matrix
 /mnt/hdb1/Source/src/Resistor
 /mnt/hdb1/Source/src/Capacitor
 /mnt/hdb1/Source/src/Tunnel
 /mnt/hdb1/Source/src/VSource
 /mnt/hdb1/Source/src/CObserver/Observer/StrArr
 /mnt/hdb1/Source/src/CObserver/Observer/Buffer
 /mnt/hdb1/Source/src/CObserver/Observer
 /mnt/hdb1/Source/src/CObserver
 /mnt/hdb1/Source/src/VSource/IntList
 /mnt/hdb1/Source/src/Iterator
 /mnt/hdb1/Source/src/Parameter
 /mnt/hdb1/Source/src/Manager
 /mnt/hdb1/Source/src/Parser
 /mnt/hdb1/Source/src/CObserver/Bin2asc
 /mnt/hdb1/Source/src
 /usr/include/c++/3.2.3
 /usr/include/c++/3.2.3/i486-slackware-linux
 /usr/include/c++/3.2.3/backward
 /usr/local/include
 /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include
 /usr/include
End of search list.
In file included from /usr/include/c++/3.2.3/backward/iostream.h:31,
                 from /mnt/hdb1/Source/src/CType/agstring.h:26,
                 from /mnt/hdb1/Source/src/CType/CType.h:4,
                 from parser.y:7:
/usr/include/c++/3.2.3/backward/backward_warning.h:32:2: warning: #warning
This file includes at least one deprecated or antiquated header. Please
consider using one of the 32 headers found in section 17.4.1.2 of the C++
standard. Examples include substituting the <X> header for the <X.h> header
for C++ includes, or <sstream> instead of the deprecated header
<strstream.h>. To disable this warning use -Wno-deprecated.
In file included from /usr/include/c++/3.2.3/bits/localefwd.h:48,
                 from /usr/include/c++/3.2.3/ios:48,
                 from /usr/include/c++/3.2.3/ostream:45,
                 from /usr/include/c++/3.2.3/iostream:45,
                 from /usr/include/c++/3.2.3/backward/iostream.h:32,
                 from /mnt/hdb1/Source/src/CType/agstring.h:26,
                 from /mnt/hdb1/Source/src/CType/CType.h:4,
                 from parser.y:7:
/usr/include/c++/3.2.3/cctype:68: `isalnum' not declared
/usr/include/c++/3.2.3/cctype:69: `isalpha' not declared
/usr/include/c++/3.2.3/cctype:70: `iscntrl' not declared
/usr/include/c++/3.2.3/cctype:71: `isdigit' not declared
/usr/include/c++/3.2.3/cctype:72: `isgraph' not declared
/usr/include/c++/3.2.3/cctype:73: `islower' not declared
/usr/include/c++/3.2.3/cctype:74: `isprint' not declared
/usr/include/c++/3.2.3/cctype:75: `ispunct' not declared
/usr/include/c++/3.2.3/cctype:76: `isspace' not declared
/usr/include/c++/3.2.3/cctype:77: `isupper' not declared
/usr/include/c++/3.2.3/cctype:78: `isxdigit' not declared
/usr/include/c++/3.2.3/cctype:79: `tolower' not declared
/usr/include/c++/3.2.3/cctype:80: `toupper' not declared
In file included from /usr/include/c++/3.2.3/bits/locale_facets.h:63,
                 from /usr/include/c++/3.2.3/bits/basic_ios.h:41,
                 from /usr/include/c++/3.2.3/ios:51,
                 from /usr/include/c++/3.2.3/ostream:45,
                 from /usr/include/c++/3.2.3/iostream:45,
                 from /usr/include/c++/3.2.3/backward/iostream.h:32,
                 from /mnt/hdb1/Source/src/CType/agstring.h:26,
                 from /mnt/hdb1/Source/src/CType/CType.h:4,
                 from parser.y:7:
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:44: `_ISupper'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:45: `_ISlower'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:46: `_ISalpha'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:47: `_ISdigit'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:48:
`_ISxdigit'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:49: `_ISspace'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:50: `_ISprint'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:51: `_ISgraph'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:52: `_IScntrl'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:53: `_ISpunct'
   was not declared in this scope
/usr/include/c++/3.2.3/i486-slackware-linux/bits/ctype_base.h:54: `_ISalnum'
   was not declared in this scope
In file included from parser.y:9:
/mnt/hdb1/Source/src/VSource/Sinusoid.h:20: default argument given for
   parameter 3 of `Sinusoid::Sinusoid(double, double, double =
   0x0000000000000000000000000000000000000000)'
/mnt/hdb1/Source/src/VSource/Sinusoid.h:8: after previous specification in `
   Sinusoid::Sinusoid(double, double, double =
   0x0000000000000000000000000000000000000000)'
make[1]: *** [/mnt/hdb1/Source/src/Parser/parser.tab.o] Error 1
make[1]: Leaving directory `/mnt/hdb1/Source/src'
make: *** [all] Error 2




[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