Subject: compiler error: 980711 (Cygwin B20 and BeOS R4)
From: Kenneth J Long II <[email-masked]>
To: [email-masked]
Date: Fri, 05 Feb 1999 00:12:04 -0500

Hello,

I am trying to compile sample source code from the book "thinking in c++" 2nd
edition.  I am using both Win95 cygwin (B20) and BeOS R4.
Eventually, this will run on Solaris (sparc) but I'm trying to use my notebook
for development....  The same error occurs on both operating systems.

Below is the source code and different pieces of information I've
gathered, including a "cygcheck.out" file for the Win95 version.
The source is from http://www.bruceeckel.com

Any ideas?   I'm somewhat newbie C++ programmer... so I dont know
if I'm doing something wrong.  Thanks.  Please let me know if I can
send any more info.

Ken

Source:

$ make
gcc -g StreamTokenizer.cpp -lstdc++.r4  -o tokenizetest
In file included from StreamTokenizer.cpp:6:
StreamTokenizer.h:14: Internal compiler error 980711.
StreamTokenizer.h:14: Please submit a Problem Report to Cygnus Solutions with
send-p
r.
make: *** [tokenizetest] Error 1
$
^^^^ the above is from BeOS R4.  but get same output from B20 on win95.

source:

#****************************************
$ more StreamTokenizer.cpp
//: C20:StreamTokenizer.cpp {O}
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 1999
// Copyright notice in Copyright.txt
#include "StreamTokenizer.h"
using namespace std;

string StreamTokenizer::next() {
  string result;
  if(p != end) {
    insert_iterator<string>
      ii(result, result.begin());
    while(isDelimiter(*p) && p != end)
      p++;
    while (!isDelimiter(*p) && p != end)
      *ii++ = *p++;
  }
  return result;
} ///:~

#*****************************************

$ more StreamTokenizer.h
//: C20:StreamTokenizer.h
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 1999
// Copyright notice in Copyright.txt
// C++ Replacement for Standard C strtok()
#ifndef STREAMTOKENIZER_H
#define STREAMTOKENIZER_H
#include <string>
#include <iostream>
#include <iterator>

class StreamTokenizer {
  typedef std::istreambuf_iterator<char> It;
  It p, end;
  std::string delimiters;
  bool isDelimiter(char c) {
    return
      delimiters.find(c) != std::string::npos;
  }
public:
  StreamTokenizer(std::istream& is,
    std::string delim = " \t\n;()\"<>:{}[]+-=&*#"
    ".,/\\~!0123456789") : p(is), end(It()),
    delimiters(delim) {}
  std::string next(); // Get next token
};
#endif STREAMTOKENIZER_H ///:~
#********************************************
$ ls -laF
total 78
drwxrwxrwx   1 baron    users       32768 Feb  3 17:34 ./
drwxrwxrwx   1 baron    users       32768 Feb  2 17:48 ../
-rw-rw-rw-   1 baron    users         512 Jan 21 08:49 StreamTokenizer.cpp
-rw-rw-rw-   1 baron    users         789 Jan 21 08:49 StreamTokenizer.h
-rw-rw-rw-   1 baron    users        1967 Jan 21 08:49 StringDeque.cpp
-rw-rw-rw-   1 baron    users         990 Jan 21 08:49 StringVector.cpp
-rw-rw-rw-   1 baron    users        1914 Jan 21 08:49 TokenIterator.h
-rw-rw-rw-   1 baron    users        2040 Feb  3 17:38 TokenIteratorTest.cpp
-rw-rw-rw-   1 baron    users         721 Jan 21 08:49 TokenizeTest.cpp
-rw-rw-rw-   1 baron    users         400 Feb  2 11:36 makefile
-rw-rw-rw-   1 baron    users         302 Feb  3 17:57 makefile.original
-rw-rw-rw-   1 baron    users           0 Feb  4 23:46 output.txt
-rw-rw-rw-   1 baron    users        1387 Jan 21 08:49 require.h

#********************************************

$ more makefile
PROGRAM = tokenizetest
LOADLIBS = stdc++.r4
CXX_SRCS = StreamTokenizer.cpp

CC = gcc
LDFLAGS = -g
CXX = gcc
CXXFLAGS = -g -Wall -O
OBJS = $(CXX_SRCS:.cc=.o)

$(PROGRAM) : $(BJS)
        $(CC) $(LDFLAGS) $(OBJS) -l$(LOADLIBS) -o $(PROGRAM)

clean:
        rm -f *.o $(PROGRAM) *~

depend:
        $(CXX) -MM $(CXX_SRCS)

###
StreamTokenizer.o: StreamTokenizer.h StreamTokenizer.cpp
#TokenIterator.o: TokenIterator.h

#**********************************************

Cygcheck.out file:

Cygnus Win95/NT Configuration Diagnostics
Current System Time: Thu Feb 04 23:59:29 1999

Win95 Ver 4.0 build 67109975  C

Path: /CYGNUS/CYGWIN~1/H-I586~1/BIN
 /WINDOWS
 /WINDOWS/COMMAND

SysDir: C:\WINDOWS\SYSTEM
WinDir: C:\WINDOWS

MAKE_MODE = `UNIX'
PWD = `//d/grammer/thinking in C++/source/c20/test'

!C: = `C:\WINDOWS\DESKTOP\Tools'
BLASTER = `A220 I5 D1 T4'
CLASSPATH = `;C:\Program Files\Exceed.95\hcljrcsv.zip;C:\Program
Files\Exceed.95'
CMDLINE = `bash'
COMSPEC = `C:\WINDOWS\COMMAND.COM'
HOSTNAME = `ken-long'
HOSTTYPE = `i586'
MACHTYPE = `i586-pc-cygwin32'
OSTYPE = `cygwin32'
PROMPT = `$p$g'
SHELL = `/bin/sh'
SHLVL = `1'
TEMP = `C:\WINDOWS\TEMP'
TERM = `cygwin'
TMP = `C:\WINDOWS\TEMP'
WINBOOTDIR = `C:\WINDOWS'
WINDIR = `C:\WINDOWS'
_ = `/CYGNUS/CYGWIN~1/H-I586~1/BIN/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
  (default) = `C:'
  unix = `/'
  fbinary = 0x00000000
  fsilent = 0x00000000
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cygnus
Cygwin B20
  (default) = `C:\WINDOWS\IsUninst.exe -fc:\cygnus\cygwin-b20\Uninst.isu'
  DisplayName = `Cygwin B20'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin B20
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin B20\B20.1
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32\i586-cygwin32
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
Solutions\GNUPro\i586-cygwin32\i586-cygwin32\cygwin-B20.1
  (default) = `c:\cygnus\cygwin-b20'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D

a:\ fd           N/A    N/A

Ken

--   
Want to unsubscribe from this list?                             
Send a message to [email-masked]