home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!gumby!destroyer!sol.ctr.columbia.edu!news
- From: brown@ccit02.duq.edu (Jason Brown)
- Subject: c++ Compilation Error, Help please
- Organization: Columbia University Center for Telecommunications Research
- Message-ID: <1992Aug31.164729.9540@ctr.columbia.edu>
- Sender: news@ctr.columbia.edu (The Daily Lose)
- Date: Mon, 31 Aug 1992 16:47:29 GMT
- X-Posted-From: ccit02.duq.edu
- X-Posted-Through: sol.ctr.columbia.edu
- Lines: 73
-
-
- Ok C++'ers we're trying to re-compile a c++ application, originally
- written for the sun, on the NeXT to run it under X-windows. Not knowing
- whole bunches about c++ has made this insteresting to say the least.
- We'd gotten through quite a bit of it when we came upon the following
- error.
-
- ccit01:/usr/local/src/align/lav->make
- cd ../lib; make
- g++ -I/import/X11R5/include -I/usr/local/include -I. -I.. -I../lib
- -pipe -Wall -DUSE_LIBGXX_INLINES -DMULTALIGN -O -fstrength-reduce
- -g -c ButtonChoice.cc
- In file included from ButtonChoice.cc:8:
- ButtonChoice.h:5: warning: `#pragma once' is obsolete
- In file included from ButtonChoice.cc:9:
- Switches.h:5: warning: `#pragma once' is obsolete
- In file included from ButtonChoice.cc:9:
- Switches.h:23: parse error before `fcn'
- Switches.h:23: syntax error before `)'
- Switches.h:24: warning: implicit declaration of function `I'
-
- The '#pragme once' messages haven't really bothered us to date, it the
- parse error on line 23. The following partial code listing causes the
- error.
- Line 23 is marked with >*>*>*>
-
- // -*- C++ -*-
- // $Id: Switches.h,v 1.8 1991/12/17 01:45:43 schwartz Exp $
-
- #ifndef _switches_h
- #pragma once
- #define _switches_h
-
- #include <InterViews/interactor.h>
- #include <InterViews/box.h>
- #include <InterViews/button.h>
- #include <InterViews/glue.h>
- #include <InterViews/painter.h>
-
- //
- // This takes a constant string, which is used to label a PushButton,
- // and an Interactor and a pointer to member of Interactor. When
- // the button is pressed, we call the member of the interactor.
- //
-
- class PushSwitch : public PushButton {
- /// XXX - should this really be derived from PushButton?
- public:
- >*>*>*> PushSwitch (const char* text, Interactor* i, void
- (Interactor::*fcn)()) :
- I(i), F(fcn),
- PushButton ("PushSwitch", text, state = new ButtonState (false), true)
- { }
-
- ~PushSwitch () { delete state; }
-
- Help, we've twisted around a bunch of these types of errors but nothing
- we've tried yet has worked on this one. Any help would be greatly
- appreciated.
-
- Thanks
-
- --Jason Brown
- brown@ccit01.duq.edu
-
- --
- ____ ___
- / / )
- / _, , __ /-,' ,_ __
- \_/__</_/>_(_/_/\/ /__)__/__(_/__(_/_)_/\/
-
- "Remember, be humble, always answer the phone...
- No matter who's in the car." --Jack Lemmoon
-