[Prev][Next][Index]
pc++ bug on sun4
- Subject: pc++ bug on sun4
- From: William Hui <whui@cs.ualberta.ca>
- To: sage-bugs@rainier.extreme.indiana.edu
- Date: Wed, 15 May 1996 18:05:15 -0600 (MDT)
- Sender: owner-sage-bugs@extreme.indiana.edu
Hi,
I am able to compile the enclosed code with g++ (g++ main_all.cc),
but when I use pc++ (pc++ -v main_all.cc), it complains the following:
No additional include paths found in enviroment...
EXECUTING: g++ -x c++ -E
-I/usr/sunkay/grad/whui/sage/target/uniproc/include
-I/usr/sunkay/grad/whui/sage/target/include -D__PCXX__ main_all.cc >
TEMP_pC++.C
EXECUTING: pC++2dep -verbose TEMP_pC++.C
Error on line 32 of /usr/gnu/lib/g++-include/_G_config.h: parse error
Error in pc++ while executing:
-------> pC++2dep -verbose TEMP_pC++.C
Again, the problem is with #include, but at different places.
Will
---- c u t h e r e --------------------------------------------------
// JUST a testing program - main_all.cc
#include <iostream.h>
#include <string.h>
#define MAX_NAME_SIZE 100
class Person
{
public:
int sin;
char *name;
Person(char *);
~Person();
int getSIN();
void setSIN(int);
char *getName();
void setName(char *);
void say(char *);
};
Person::Person(char *aName)
{
sin = 123456789; // assign arbitrary SIN; should use class var.
name = new char [MAX_NAME_SIZE];
strcpy(name, aName);
};
Person::~Person()
{
delete name;
};
int Person::getSIN() { return(sin); };
void Person::setSIN(int i) { sin = i; };
char *Person::getName() { return(name); };
void Person::setName(char *s) { strcpy(name, s); };
void Person::say(char *s)
{
cout << endl;
cout << this->getName() << " says: " << endl;
cout << " \"" << s << "\"" << endl;
};
// ############## MAIN ###############
void main(int argc, char **argv)
{
Person *will;
will = new Person("Will Hui");
will->say("Hello World!");
delete will;
};