home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11378 < prev    next >
Encoding:
Text File  |  1992-07-22  |  3.5 KB  |  125 lines

  1. Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!eng.umd.edu!equine
  2. From: equine@eng.umd.edu
  3. Newsgroups: comp.lang.c++
  4. Date: 17 Jul 92 21:10 MDT
  5. Subject: Problem compiling BC++ 3.0 code in 
  6. Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
  7. Message-ID: <1992Jul17.171019.4356@eng.umd.ed>
  8. Nf-ID: #N:1992Jul17.171019.4356@eng.umd.ed:-1438566115:001:3112
  9. Nf-From: eng.umd.edu!equine    Jul 17 21:10:00 1992
  10. Lines: 113
  11.  
  12.  
  13.  
  14. Hi, I'm having some problems compiling code with BC++ 3.1 that worked
  15. under version 3.0.  If anyone is familiar with the Object Graphics Library
  16. (WhiteWater), MSWindows 3.1, and BC++ 3.1 I'd appreciate any suggestions.
  17.  
  18.  
  19. I've tried similar definitions using int's instead of TColor's, and they
  20. compile without problems.  Also, if I remove the "extern TColor" statements
  21. I get "undefined" errors in the CLASMARK module.
  22.  
  23.  
  24.  
  25. // Header files for module TEST1.CPP - the code in this module compiles
  26. // without errors in both BC++ versions 3.0 and 3.1.  This module is
  27. // compiled first.
  28.  
  29. #include <windows.h>    // For MSWindows 3.1
  30. #include <ogl.h>        // Object Graphics Library - TColor class defined
  31. #include <gscrolle.h>   // code for window scroller bars.
  32. #include <stdio.h>
  33. #include "colors.h"
  34. #include "menubutton.h" 
  35. #include "clasmark.h"
  36. #include "test1.h"
  37. #define  WM_PARENTRESIZE WM_USER
  38.  
  39.  
  40. .
  41. .
  42. .
  43. .
  44. .
  45. .
  46.  
  47.  
  48.  
  49. ---------------------------------------------------------------------
  50.  
  51. // Headers for module CLASMARK.CPP.  It is compiled after TEST1.CPP.
  52. // BC++ version 3.0 compiles both modules without any errors, but the
  53. // BC++ version 3.1 compiler outputs
  54.  
  55. // " Declaration Syntax Error "
  56.  
  57. // at     #include "colors.h"     for the "extern TColor" statements.
  58.  
  59. #if !defined CLASSIFICATION_INCLUDED
  60. #define CLASSIFICATION_INCLUDED
  61.  
  62. #include <windows.h>
  63. #include <ogl.h>       \
  64. #include <rectangl.h>   \   // these are all part of
  65. #include <label.h>      /   // Object Graphics Library
  66. #include <textpen.h>   /
  67. #include <string.h>
  68. #define __colors__
  69. #include "colors.h"                 // error occurs here
  70. #include "clasmark.h"
  71. .
  72. .
  73. .
  74. .
  75. .
  76. .
  77.  
  78.  
  79. ---------------------------------------------------------------------
  80.  
  81. // Listing of header file COLORS.H
  82. // color definitions
  83.  
  84. #if defined(__colors__)
  85. TColor green     (  0, 255,   0);      // TColor's SetRGB (Red Green Blue)
  86. TColor bkcolor   (  0, 128, 128);      // member function
  87. TColor plum      (128,   0, 128);
  88. TColor tealhatch ( 95, 159, 159);
  89. TColor navy      (  0,   0, 128);
  90. TColor medblue   ( 64,   0, 194);
  91. TColor ltblue    (  0,  64, 128);
  92. TColor white     (255, 255, 255);
  93. TColor black     (  0,   0,   0);
  94. TColor grey      (128, 128, 128);
  95. TColor ltgrey    (192, 192, 192);
  96. TColor red       (255,   0,   0);
  97. TColor cyan      (  0, 255, 255);
  98. TColor yellow    (255, 255,   0);
  99. TColor gold      (255, 128,   0);
  100. TColor blue      (  0,   0, 255);
  101. TColor pink      (255,   0, 255);
  102.  
  103. #else
  104. extern TColor green;       \
  105. extern TColor bkcolor;      \
  106. extern TColor plum;          \
  107. extern TColor tealhatch;      \ 
  108. extern TColor navy;            \
  109. extern TColor medblue;          \
  110. extern TColor ltblue;            \     Declaration Syntax Error
  111. extern TColor white;              \    occurs for these statements.
  112. extern TColor black;              /
  113. extern TColor ltgrey;            /
  114. extern TColor red;              /
  115. extern TColor cyan;            /
  116. extern TColor yellow;         /
  117. extern TColor gold;          /
  118. extern TColor blue;         /
  119. extern TColor pink;        /
  120.  
  121. #endif
  122.  
  123. ---------------------------------------------------------------------
  124.  
  125.