home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13097 < prev    next >
Encoding:
Text File  |  1992-08-31  |  2.7 KB  |  86 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!gumby!destroyer!sol.ctr.columbia.edu!news
  3. From: brown@ccit02.duq.edu (Jason Brown)
  4. Subject: c++ Compilation Error, Help please
  5. Organization: Columbia University Center for Telecommunications Research
  6. Message-ID: <1992Aug31.164729.9540@ctr.columbia.edu>
  7. Sender: news@ctr.columbia.edu (The Daily Lose)
  8. Date: Mon, 31 Aug 1992 16:47:29 GMT
  9. X-Posted-From: ccit02.duq.edu
  10. X-Posted-Through: sol.ctr.columbia.edu
  11. Lines: 73
  12.  
  13.  
  14. Ok C++'ers we're trying to re-compile a c++ application, originally  
  15. written for the sun, on the NeXT to run it under X-windows.  Not knowing  
  16. whole bunches about c++ has made this insteresting to say the least.    
  17. We'd gotten through quite a bit of it when we came upon the following  
  18. error.
  19.  
  20.     ccit01:/usr/local/src/align/lav->make
  21.     cd ../lib; make
  22.     g++ -I/import/X11R5/include -I/usr/local/include -I. -I.. -I../lib  
  23.     -pipe -Wall -DUSE_LIBGXX_INLINES -DMULTALIGN -O  -fstrength-reduce   
  24. -g -c ButtonChoice.cc
  25.     In file included from ButtonChoice.cc:8:
  26.     ButtonChoice.h:5: warning: `#pragma once' is obsolete
  27.     In file included from ButtonChoice.cc:9:
  28.     Switches.h:5: warning: `#pragma once' is obsolete
  29.     In file included from ButtonChoice.cc:9:
  30.     Switches.h:23: parse error before `fcn'
  31.     Switches.h:23: syntax error before `)'
  32.     Switches.h:24: warning: implicit declaration of function `I'
  33.  
  34. The '#pragme once' messages haven't really bothered us to date, it the  
  35. parse error on line 23. The following partial code listing causes the  
  36. error.
  37. Line 23 is marked with >*>*>*>
  38.  
  39. // -*- C++ -*-
  40. // $Id: Switches.h,v 1.8 1991/12/17 01:45:43 schwartz Exp $
  41.  
  42. #ifndef _switches_h
  43. #pragma once
  44. #define _switches_h
  45.  
  46. #include <InterViews/interactor.h>
  47. #include <InterViews/box.h>
  48. #include <InterViews/button.h>
  49. #include <InterViews/glue.h>
  50. #include <InterViews/painter.h>
  51.  
  52. // 
  53. // This takes a constant string, which is used to label a PushButton,
  54. // and an Interactor and a pointer to member of Interactor.  When
  55. // the button is pressed, we call the member of the interactor.
  56. //
  57.  
  58. class PushSwitch : public PushButton {
  59.   /// XXX - should this really be derived from PushButton?
  60. public:
  61. >*>*>*>  PushSwitch (const char* text, Interactor* i, void  
  62. (Interactor::*fcn)()) : 
  63.   I(i), F(fcn), 
  64.   PushButton ("PushSwitch", text, state = new ButtonState (false), true)
  65.     { }
  66.  
  67.   ~PushSwitch () { delete state; }
  68.  
  69. Help, we've twisted around a bunch of these types of errors but nothing  
  70. we've tried yet has worked on this one.  Any help would be greatly  
  71. appreciated.
  72.  
  73. Thanks
  74.  
  75. --Jason Brown
  76. brown@ccit01.duq.edu
  77.  
  78. --
  79.    ____               ___
  80.     /                 /  )
  81.    /  _, ,  __       /-,' ,_  __
  82. \_/__</_/>_(_/_/\/  /__)__/__(_/__(_/_)_/\/
  83.  
  84. "Remember, be humble, always answer the phone...
  85.  No matter who's in the car." --Jack Lemmoon
  86.