Subject: Re: problems compiling c++ source
To: Ethan Bakshy <ethan@enteract.com>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: netbsd-help
Date: 09/05/1999 11:25:57
Ethan Bakshy wrote:
> 
> I am trying to compile a small C++ program to test the AP Vector class (used for the Advanced Placement C++ course in highschools), but I get this error:
> 
> ethan@funbox:/home/ethan/school/cs/09.03.99(48)% g++ main.cc
> In file included from main.cc:5:
> apvector.h:36: syntax error before `('
> apvector.h:48: syntax error before `const'
> In file included from apvector.cc:15,
>                  from apvector.h:134,
>                  from main.cc:5:
> /usr/include/assert.h:63: syntax error before string constant
> 
> why is it having problems with the assert.h file? Is there something I'm
> not doing right at the command line? .cc is the extension for c++ files,
> right?

After having removed the #include <apvector.cpp> from apvector.h,

c++ -Wall -c apvector.cc

compiles with no errors under 1.4 for me. (Next would be
c++ main.cc apvector.o) So what is your main.cc like? And is your assert.h
     $NetBSD: assert.h,v 1.7 1998/11/14 16:30:07 christos Exp $
?

Cheers,

Patrick