Need key to solve the C++ problem

K

kwan

Hello All,

I tried to compile C++, but it is not working, I wonder whether the
problem relate to the softcode or there is a way to compile it.
Could you give any hint for the solution? Thank


In file included from /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../
include/c++/3.4.6/backward/iostream.h:31,
from main.cc:4:
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/
backward/backward_warning.h:32:2: warning: #warning This file includes
at least one deprecated or antiquated header. Please consider using
one of the 32 headers found in section 17.4.1.2 of the C++ standard.
Examples include substituting the <X> header for the <X.h> header for C
++ includes, or <iostream> instead of the deprecated header
<iostream.h>. To disable this warning use -Wno-deprecated.
main.cc:7:20: except.h: No such file or directory
main.cc:8:19: label.h: No such file or directory
In file included from main.cc:9:
Problem.h:8:22: Inserter.h: No such file or directory
In file included from Problem.h:10,
from main.cc:9:
QuadEqn.h:7:20: RCDEqn.h: No such file or directory
In file included from QuadEqn.h:8,
from Problem.h:10,
from main.cc:9:
State.h:7:21: Vector2.h: No such file or directory
State.h:8:26: Vector2Array.h: No such file or directory
State.h:9:23: BlockTri2.h: No such file or directory
In file included from QuadEqn.h:8,
from Problem.h:10,
from main.cc:9:
State.h:11: error: `Vector2' does not name a type
State.h:12: error: `Vector2Array' does not name a type
State.h:13: error: `Matrix2' does not name a type
State.h:14: error: `Matrix2Array' does not name a type
State.h:15: error: `FactorMatrix2' does not name a type
State.h:16: error: `BlockTriVector2' does not name a type
State.h:17: error: `BlockTriMatrix2' does not name a type
State.h:23: error: expected class-name before '{' token
State.h:39: error: expected `,' or `...' before '&' token
State.h:39: error: ISO C++ forbids declaration of `StateTangentVector'
with no type
State.h:40: error: expected `,' or `...' before '&' token
State.h:40: error: ISO C++ forbids declaration of `StateTangentVector'
with no type
State.h:48: error: expected `,' or `...' before '&' token
State.h:48: error: ISO C++ forbids declaration of `StateTangentVector'
with no type
State.h:51: error: ISO C++ forbids declaration of `StateTangentVector'
with no type
State.h:51: error: `StateTangentVector' is neither function nor member
function; cannot be declared friend
State.h:51: error: `StateTangentVector' declared as an `inline' field
State.h:51: error: expected `;' before "operator"
State.h:54: error: expected `,' or `...' before '&' token
State.h:54: error: ISO C++ forbids declaration of `StateTangentVector'
with no type
State.h:55: error: expected `,' or `...' before '&' token
State.h:55: error: ISO C++ forbids declaration of `StateTangentVector'
with no type
State.h:55: error: `State operator+(int)' must have an argument of
class or enumerated type
State.h:56: error: expected initializer before "operator"
State.h: In copy constructor `State::State(const State&)':
State.h:63: error: class `State' does not have any field named
`StateTangentVector'
State.h: At global scope:
State.h:68: error: expected `,' or `...' before '&' token
State.h:69: error: ISO C++ forbids declaration of `StateTangentVector'
with no type
State.h: In constructor `State::State(int)':
State.h:69: error: class `State' does not have any field named
`StateTangentVector'
State.h:69: error: `vector' was not declared in this scope
State.h: In member function `State& State::eek:perator=(const State&)':
State.h:81: error: `StateTangentVector' has not been declared
State.h: In member function `State& State::zero()':
State.h:88: error: `StateTangentVector' has not been declared
State.h: In static member function `static int State::n_comps()':
State.h:95: error: `StateTangentVector' has not been declared
State.h: In member function `void State::range_check(int) const':
State.h:101: error: `StateTangentVector' has not been declared
State.h: In member function `double& State::eek:perator()(int)':
State.h:107: error: `StateTangentVector' has not been declared
State.h: In member function `double State::eek:perator()(int) const':
State.h:113: error: `StateTangentVector' has not been declared
State.h: In member function `double& State::component(int)':
State.h:119: error: `StateTangentVector' has not been declared
State.h: In member function `double State::component(int) const':
State.h:125: error: `StateTangentVector' has not been declared
State.h: At global scope:
State.h:129: error: expected `,' or `...' before '&' token
State.h:130: error: ISO C++ forbids declaration of
`StateTangentVector' with no type
State.h: In member function `State& State::eek:perator+=(int)':
State.h:131: error: `StateTangentVector' is not a class or namespace
State.h:131: error: `b' was not declared in this scope
State.h: At global scope:
State.h:136: error: expected `,' or `...' before '&' token
State.h:137: error: ISO C++ forbids declaration of
`StateTangentVector' with no type
State.h: In member function `State& State::eek:perator-=(int)':
State.h:138: error: `StateTangentVector' is not a class or namespace
State.h:138: error: `b' was not declared in this scope
State.h: At global scope:
State.h:143: error: expected `,' or `...' before '&' token
State.h:144: error: ISO C++ forbids declaration of
`StateTangentVector' with no type
State.h: In function `State operator+(const State&, int)':
State.h:146: error: `b' was not declared in this scope
State.h: At global scope:
State.h:151: error: expected `,' or `...' before '&' token
State.h:152: error: ISO C++ forbids declaration of
`StateTangentVector' with no type
State.h:152: error: `State operator+(int)' must have an argument of
class or enumerated type
State.h: In function `State operator+(int)':
State.h:153: error: `b' was not declared in this scope
State.h:154: error: `a' was not declared in this scope
State.h: At global scope:
State.h:159: error: expected initializer before "operator"
State.h: In function `State interpolate_states(const State&, const
State&, double)':
State.h:169: error: no match for 'operator-' in 's2 - s1'
State.h: At global scope:
State.h:192: error: expected `,' or `...' before '&' token
State.h:192: error: ISO C++ forbids declaration of
`StateTangentVectorArray' with no type
State.h:193: error: expected `,' or `...' before '&' token
State.h:193: error: ISO C++ forbids declaration of
`StateTangentVectorArray' with no type
State.h:299: error: expected `,' or `...' before '&' token
State.h:300: error: ISO C++ forbids declaration of
`StateTangentVectorArray' with no type
State.h: In member function `StateArray& StateArray::eek:perator+=(int)':
State.h:302: error: `b' was not declared in this scope
State.h: At global scope:
State.h:307: error: expected `,' or `...' before '&' token
State.h:308: error: ISO C++ forbids declaration of
`StateTangentVectorArray' with no type
State.h: In member function `StateArray& StateArray::eek:perator-=(int)':
State.h:310: error: `b' was not declared in this scope
State.h: At global scope:
State.h:314: error: `StateTangentVector' does not name a type
State.h:315: error: `StateTangentVectorArray' does not name a type
State.h:317: error: `StateTangentVector' does not name a type
State.h:318: error: `StateTangentVectorArray' does not name a type
State.h:320: error: `StateTangentMatrix' does not name a type
State.h:321: error: `StateTangentMatrixArray' does not name a type
State.h:323: error: `StateTangentVector' does not name a type
State.h:324: error: `StateTangentVectorArray' does not name a type
State.h:326: error: `StateTangentMatrix' does not name a type
State.h:327: error: `StateTangentMatrixArray' does not name a type
State.h:333: error: expected `,' or `...' before '&' token
State.h:333: error: ISO C++ forbids declaration of
`StateTangentVector' with no type
State.h:335: error: expected `,' or `...' before '&' token
State.h:335: error: ISO C++ forbids declaration of
`StateTangentVectorArray' with no type
In file included from Problem.h:10,
from main.cc:9:
QuadEqn.h:11: error: expected class-name before '{' token
QuadEqn.h:24: error: ISO C++ forbids declaration of `Viscosity' with
no type
QuadEqn.h:24: error: expected `;' before '&' token
QuadEqn.h:25: error: `Viscosity' does not name a type
QuadEqn.h:29: error: `ConservedQuantity' does not name a type
QuadEqn.h:31: error: `ConservedQuantityArray' does not name a type
QuadEqn.h:34: error: expected `,' or `...' before '&' token
QuadEqn.h:34: error: ISO C++ forbids declaration of
`ConservedQuantity' with no type
QuadEqn.h:35: error: expected `,' or `...' before '&' token
QuadEqn.h:36: error: ISO C++ forbids declaration of `ScalarArray' with
no type
QuadEqn.h:38: error: `Flux' does not name a type
QuadEqn.h:39: error: `FluxArray' does not name a type
QuadEqn.h:42: error: `Viscosity' does not name a type
QuadEqn.h:43: error: `ViscosityArray' does not name a type
QuadEqn.h:46: error: `Source' does not name a type
QuadEqn.h:47: error: `SourceArray' does not name a type
QuadEqn.h:50: error: `Jacobian' does not name a type
QuadEqn.h:52: error: `JacobianArray' does not name a type
QuadEqn.h:56: error: `Jacobian' does not name a type
QuadEqn.h:57: error: `JacobianArray' does not name a type
QuadEqn.h:60: error: `Jacobian' does not name a type
QuadEqn.h:61: error: `JacobianArray' does not name a type
QuadEqn.h:64: error: expected `,' or `...' before '&' token
QuadEqn.h:64: error: ISO C++ forbids declaration of `Profile' with no
type
QuadEqn.h:65: error: expected `,' or `...' before '&' token
QuadEqn.h:65: error: ISO C++ forbids declaration of `Profile' with no
type
QuadEqn.h:66: error: expected `,' or `...' before '&' token
QuadEqn.h:66: error: ISO C++ forbids declaration of `Profile' with no
type
QuadEqn.h:85: error: `Viscosity' does not name a type
In file included from main.cc:9:
Problem.h:11:16: BC.h: No such file or directory
Problem.h:12:20: Coords.h: No such file or directory
Problem.h:13:18: Data.h: No such file or directory
Problem.h:14:20: CCGrid.h: No such file or directory
Problem.h:15:22: TimeStep.h: No such file or directory
Problem.h:16:25: RCDDynamics.h: No such file or directory
Problem.h:17:23: RCDMethod.h: No such file or directory
Problem.h:18:21: History.h: No such file or directory
Problem.h:19:25: Diagnostics.h: No such file or directory
Problem.h:20:20: Fronts.h: No such file or directory
In file included from main.cc:9:
Problem.h:31: error: ISO C++ forbids declaration of `BC' with no type
Problem.h:31: error: expected `;' before '&' token
Problem.h:32: error: ISO C++ forbids declaration of `BC' with no type
Problem.h:32: error: expected `;' before '&' token
Problem.h:34: error: ISO C++ forbids declaration of `BC' with no type
Problem.h:34: error: expected `;' before '&' token
Problem.h:35: error: ISO C++ forbids declaration of `BC' with no type
Problem.h:35: error: expected `;' before '&' token
Problem.h:37: error: ISO C++ forbids declaration of `Coords' with no
type
Problem.h:37: error: expected `;' before '&' token
Problem.h:38: error: ISO C++ forbids declaration of `Coords' with no
type
Problem.h:38: error: expected `;' before '&' token
Problem.h:40: error: ISO C++ forbids declaration of `Data' with no
type
Problem.h:40: error: expected `;' before '&' token
Problem.h:41: error: ISO C++ forbids declaration of `Data' with no
type
Problem.h:41: error: expected `;' before '&' token
Problem.h:43: error: ISO C++ forbids declaration of `CCGrid' with no
type
Problem.h:43: error: expected `;' before '&' token
Problem.h:44: error: ISO C++ forbids declaration of `CCGrid' with no
type
Problem.h:44: error: expected `;' before '&' token
Problem.h:46: error: ISO C++ forbids declaration of `TimeStep' with no
type
Problem.h:46: error: expected `;' before '&' token
Problem.h:47: error: ISO C++ forbids declaration of `TimeStep' with no
type
Problem.h:47: error: expected `;' before '&' token
Problem.h:49: error: ISO C++ forbids declaration of `RCDDynamics' with
no type
Problem.h:49: error: expected `;' before '&' token
Problem.h:50: error: ISO C++ forbids declaration of `RCDDynamics' with
no type
Problem.h:50: error: expected `;' before '&' token
Problem.h:52: error: ISO C++ forbids declaration of `RCDMethod' with
no type
Problem.h:52: error: expected `;' before '&' token
Problem.h:53: error: ISO C++ forbids declaration of `RCDMethod' with
no type
Problem.h:53: error: expected `;' before '&' token
Problem.h:55: error: ISO C++ forbids declaration of `History' with no
type
Problem.h:55: error: expected `;' before '&' token
Problem.h:56: error: ISO C++ forbids declaration of `History' with no
type
Problem.h:56: error: expected `;' before '&' token
Problem.h:58: error: ISO C++ forbids declaration of `Diagnostics' with
no type
Problem.h:58: error: expected `;' before '&' token
Problem.h:59: error: ISO C++ forbids declaration of `Diagnostics' with
no type
Problem.h:59: error: expected `;' before '&' token
Problem.h:61: error: ISO C++ forbids declaration of `Fronts' with no
type
Problem.h:61: error: expected `;' before '&' token
Problem.h:62: error: ISO C++ forbids declaration of `Fronts' with no
type
Problem.h:62: error: expected `;' before '&' token
Problem.h:67: error: `Coords' does not name a type
Problem.h:68: error: `TimeStep' does not name a type
Problem.h:69: error: `History' does not name a type
Problem.h:70: error: `Diagnostics' does not name a type
Problem.h:71: error: `Fronts' does not name a type
Problem.h:73: error: ISO C++ forbids declaration of `BC' with no type
Problem.h:73: error: expected `;' before '*' token
Problem.h:74: error: ISO C++ forbids declaration of `BC' with no type
Problem.h:74: error: expected `;' before '*' token
Problem.h:75: error: ISO C++ forbids declaration of `CCGrid' with no
type
Problem.h:75: error: expected `;' before '*' token
Problem.h:76: error: ISO C++ forbids declaration of `Data' with no
type
Problem.h:76: error: expected `;' before '*' token
Problem.h:77: error: ISO C++ forbids declaration of `RCDDynamics' with
no type
Problem.h:77: error: expected `;' before '*' token
Problem.h:78: error: ISO C++ forbids declaration of `RCDMethod' with
no type
Problem.h:78: error: expected `;' before '*' token
Problem.h:80: error: `Inserter' does not name a type
Problem.h:81: error: `Inserter' does not name a type
Problem.h:82: error: `Inserter' does not name a type
Problem.h:84: error: ISO C++ forbids declaration of `Inserter' with no
type
Problem.h:84: error: expected `;' before '*' token
Problem.h:85: error: ISO C++ forbids declaration of `Inserter' with no
type
Problem.h:85: error: expected `;' before '*' token
Problem.h:86: error: ISO C++ forbids declaration of `Inserter' with no
type
Problem.h:86: error: expected `;' before '*' token
Problem.h:87: error: ISO C++ forbids declaration of `Inserter' with no
type
Problem.h:87: error: expected `;' before '*' token
Problem.h:88: error: ISO C++ forbids declaration of `Inserter' with no
type
Problem.h:88: error: expected `;' before '*' token
main.cc:10:23: Evolution.h: No such file or directory
main.cc:13:17: GUI.h: No such file or directory
In file included from main.cc:14:
Win.h:7:22: PanelWin.h: No such file or directory
Win.h:9:20: Evolve.h: No such file or directory
Win.h:10:27: EvolveControl.h: No such file or directory
Win.h:11:24: EvolveView.h: No such file or directory
Win.h:12:27: RCDMethodView.h: No such file or directory
Win.h:14:25: EvolveScene.h: No such file or directory
In file included from Win.h:15,
from main.cc:14:
QuadPlotWindows.h:7:20: Plot2d.h: No such file or directory
QuadPlotWindows.h:8:20: Plot3d.h: No such file or directory
QuadPlotWindows.h:9:23: Proj2dMap.h: No such file or directory
QuadPlotWindows.h:10:23: Proj3dMap.h: No such file or directory
QuadPlotWindows.h:11:26: CompositeMap.h: No such file or directory
QuadPlotWindows.h:12:26: TargetView2d.h: No such file or directory
QuadPlotWindows.h:13:26: TargetView3d.h: No such file or directory
QuadPlotWindows.h:15:24: EvolvePlot.h: No such file or directory
In file included from Win.h:15,
from main.cc:14:
QuadPlotWindows.h:19: error: expected class-name before '{' token
QuadPlotWindows.h:21: error: expected `,' or `...' before '&' token
QuadPlotWindows.h:21: error: ISO C++ forbids declaration of `Frame'
with no type
QuadPlotWindows.h:30: error: ISO C++ forbids declaration of
`EvolveScene' with no type
QuadPlotWindows.h:30: error: expected `;' before '&' token
QuadPlotWindows.h:32: error: `Plot2d' does not name a type
QuadPlotWindows.h:33: error: `Proj2dMap' does not name a type
QuadPlotWindows.h:34: error: `CompositeMap' does not name a type
QuadPlotWindows.h:35: error: `TargetView2d' does not name a type
QuadPlotWindows.h:37: error: `Plot2d' does not name a type
QuadPlotWindows.h:38: error: `Proj2dMap' does not name a type
QuadPlotWindows.h:39: error: `CompositeMap' does not name a type
QuadPlotWindows.h:40: error: `TargetView2d' does not name a type
QuadPlotWindows.h:42: error: `Plot2d' does not name a type
QuadPlotWindows.h:43: error: `Proj2dMap' does not name a type
QuadPlotWindows.h:44: error: `CompositeMap' does not name a type
QuadPlotWindows.h:45: error: `TargetView2d' does not name a type
QuadPlotWindows.h:46: error: `Plot3d' does not name a type
QuadPlotWindows.h:47: error: `Proj3dMap' does not name a type
QuadPlotWindows.h:48: error: `CompositeMap' does not name a type
QuadPlotWindows.h:49: error: `TargetView3d' does not name a type
In file included from main.cc:14:
Win.h:17:32: EvolvePlotSettings.h: No such file or directory
In file included from Win.h:19,
from main.cc:14:
ProblemSettings.h:7:19: Panel.h: No such file or directory
In file included from ProblemSettings.h:9,
from Win.h:19,
from main.cc:14:
QuadEqnSettings.h:7:20: ADTADV.h: No such file or directory
QuadEqnSettings.h:9:25: PanelButton.h: No such file or directory
QuadEqnSettings.h:10:26: PanelMessage.h: No such file or directory
QuadEqnSettings.h:11:28: PanelFloatText.h: No such file or directory
QuadEqnSettings.h:12:22: Settings.h: No such file or directory
QuadEqnSettings.h:13:28: CoordsSettings.h: No such file or directory
In file included from ProblemSettings.h:9,
from Win.h:19,
from main.cc:14:
QuadEqnSettings.h:17: error: expected class-name before ',' token
QuadEqnSettings.h:19: error: expected class-name before '{' token
QuadEqnSettings.h:21: error: expected `,' or `...' before '&' token
QuadEqnSettings.h:21: error: ISO C++ forbids declaration of `Panel'
with no type
QuadEqnSettings.h:31: error: `PanelMessage' does not name a type
QuadEqnSettings.h:32: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:33: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:34: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:35: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:36: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:38: error: `PanelMessage' does not name a type
QuadEqnSettings.h:39: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:40: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:41: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:42: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:43: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:45: error: `PanelMessage' does not name a type
QuadEqnSettings.h:46: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:47: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:48: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:49: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:51: error: `PanelMessage' does not name a type
QuadEqnSettings.h:52: error: `PanelFloatText' does not name a type
QuadEqnSettings.h:57: error: expected class-name before '{' token
QuadEqnSettings.h:59: error: expected `,' or `...' before '&' token
QuadEqnSettings.h:60: error: ISO C++ forbids declaration of `Frame'
with no type
QuadEqnSettings.h:66: error: `ApplyButton' does not name a type
QuadEqnSettings.h:67: error: `ResetButton' does not name a type
QuadEqnSettings.h:72: error: expected class-name before '{' token
QuadEqnSettings.h:74: error: expected `,' or `...' before '&' token
QuadEqnSettings.h:74: error: ISO C++ forbids declaration of `Panel'
with no type
In file included from Win.h:19,
from main.cc:14:
ProblemSettings.h:11:30: TimeStepSettings.h: No such file or directory
In file included from Win.h:19,
from main.cc:14:
ProblemSettings.h:17: error: expected `,' or `...' before '&' token
ProblemSettings.h:18: error: ISO C++ forbids declaration of `Panel'
with no type
ProblemSettings.h:23: error: `CoordsSettingsButton' does not name a
type
ProblemSettings.h:24: error: `TimeStepSettingsButton' does not name a
type
ProblemSettings.h:26: error: ISO C++ forbids declaration of
`PanelButton' with no type
ProblemSettings.h:26: error: expected `;' before '*' token
ProblemSettings.h:27: error: ISO C++ forbids declaration of
`PanelButton' with no type
ProblemSettings.h:27: error: expected `;' before '*' token
ProblemSettings.h:28: error: ISO C++ forbids declaration of
`PanelButton' with no type
ProblemSettings.h:28: error: expected `;' before '*' token
ProblemSettings.h:29: error: ISO C++ forbids declaration of
`PanelButton' with no type
ProblemSettings.h:29: error: expected `;' before '*' token
ProblemSettings.h:30: error: ISO C++ forbids declaration of
`PanelButton' with no type
ProblemSettings.h:30: error: expected `;' before '*' token
In file included from main.cc:14:
Win.h:23: error: expected class-name before '{' token
Win.h:25: error: `Evolve' has not been declared
Win.h:26: error: ISO C++ forbids declaration of `evolve' with no type
Win.h:32: error: `EvolveControl' does not name a type
Win.h:33: error: `EvolveView' does not name a type
Win.h:34: error: `RCDMethodView' does not name a type
Win.h:36: error: `EvolveScene' does not name a type
Win.h:38: error: `EvolvePlot' does not name a type
Win.h:39: error: `Inserter' does not name a type
Win.h:41: error: `EvolvePlotSettingsButton' does not name a type
main.cc: In function `void evolve()':
main.cc:50: error: `Evolution' was not declared in this scope
main.cc:50: error: expected `;' before "evolution"
main.cc:60: error: `evolution' was not declared in this scope
main.cc:64: error: `evolution' was not declared in this scope
main.cc: In function `void options(int, char**)':
main.cc:110: error: `GUI' has not been declared
main.cc:110: error: `init' was not declared in this scope
main.cc: In member function `std::basic_ios<char,
std::char_traits said:
::eek:perator=(const std::basic_ios<char, std::char_traits<char> >&)':
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/
bits/ios_base.h:784: error: `std::ios_base&
std::ios_base::eek:perator=(const std::ios_base&)' is private
main.cc:129: error: within this context
main.cc: In function `void options(int, char**)':
main.cc:176: error: `label_debugging_level' was not declared in this
scope
 
V

Victor Bazarov

kwan said:
I tried to compile C++, but it is not working, I wonder whether the
problem relate to the softcode or there is a way to compile it.
Could you give any hint for the solution? Thank


In file included from
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../
include/c++/3.4.6/backward/iostream.h:31, from

Note the name of the file (just before the ":31").
main.cc:4:
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/
backward/backward_warning.h:32:2: warning: #warning This file
includes at least one deprecated or antiquated header. Please
consider using one of the 32 headers found in section 17.4.1.2 of the
C++ standard. Examples include substituting the <X> header for the
<X.h> header for C ++ includes, or <iostream> instead of the
deprecated header <iostream.h>. [..]

Could you tell us what of the last five and a half lines you *don't*
understand? It even makes you a suggestion; have you tried following
it?

V
 
V

Victor Bazarov

kwan said:
[..cannot compile..]
main.cc:8:19: label.h: No such file or directory

What part of this error message don't you understand?
Let's skip the rest of the same ones...
[..]
State.h:7:21: Vector2.h: No such file or directory
State.h:8:26: Vector2Array.h: No such file or directory [..]
State.h:11: error: `Vector2' does not name a type
State.h:12: error: `Vector2Array' does not name a type

So, if it can't find certain headers, could it be that it
can't find the types *apparently defined* in those headers?
[..and so on..]

Come on, pay attention to what your compiler is telling you!

V
 
K

kwan

kwan said:
[..cannot compile..]
main.cc:8:19: label.h: No such file or directory

What part of this error message don't you understand?
Let's skip the rest of the same ones...


[..]
State.h:7:21: Vector2.h: No such file or directory
State.h:8:26: Vector2Array.h: No such file or directory [..]
State.h:11: error: `Vector2' does not name a type
State.h:12: error: `Vector2Array' does not name a type

So, if it can't find certain headers, could it be that it
can't find the types *apparently defined* in those headers?
[..and so on..]

Come on, pay attention to what your compiler is telling you!

V

The main problem is that it is perhaps can not find the right path for
the header file, I wrote a small program but it compiles and runs
properly.
 
K

kwan

kwan said:
[..cannot compile..]
main.cc:8:19: label.h: No such file or directory
What part of this error message don't you understand?
Let's skip the rest of the same ones...
[..]
State.h:7:21: Vector2.h: No such file or directory
State.h:8:26: Vector2Array.h: No such file or directory [..]
State.h:11: error: `Vector2' does not name a type
State.h:12: error: `Vector2Array' does not name a type
So, if it can't find certain headers, could it be that it
can't find the types *apparently defined* in those headers?
[..and so on..]
Come on, pay attention to what your compiler is telling you!

The main problem is that it is perhaps can not find the right path for
the header file, I wrote a small program but it compiles and runs
properly.
-------------------------
As notice, when I do the seek, and replace the full path inside the
soft code, it is not show the error.
I replaced <bool.h> with this
</usr/src/kernels/2.6.9-42.EL-smp-i686/include/config/isdn/capi/capifs/
bool.h
-----------
#include </usr/src/kernels/2.6.9-42.EL-smp-i686/include/config/isdn/
capi/capifs/bool.h>
//#include <trapfpe.h>
#include <stdlib.h>
#include <iostream.h>
#include <getopt.h>
#include <fstream.h>
#include <except.h>
#include <label.h>
#include "Problem.h"
#include "Evolution.h"

#ifndef NO_GUI
#include <GUI.h>
#include "Win.h"
#endif

static char *program_name = "evolve";
static bool batch = false;
static bool restart = false; // TODO: use this flag

void options(int argc, char **argv);
void evolve(void);

int
main(int argc, char **argv)
{
options(argc, argv);

//trapfpe();

#ifdef except_h_HAS_EXCEPTIONS
try {
#endif /* except_h_HAS_EXCEPTIONS */
evolve();
#ifdef except_h_HAS_EXCEPTIONS
}
catch (exception &e) {
cerr << "ERROR: " << program_name << ": " << e.what() << endl;
abort();
}
#endif /* except_h_HAS_EXCEPTIONS */

return 0;
}

void
evolve(void)
{
Problem problem(cin, cout);
Evolution evolution(problem, cout);

#ifdef NO_GUI

while (evolution.advance())
;

#else /* ! NO_GUI */

if (batch) {
while (evolution.advance())
;
}
else {
Win win(program_name, problem, evolution, cin, cout);
win.start_loop();
}

#endif /* NO_GUI */
}

#ifndef NO_GUI
static bool
hasopt(int argc, char * const *argv, const char *optstring, int opt)
{
int old_optind = optind;
int old_opterr = opterr;

optind = 1;
opterr = 0;
int has = false;

int c;
while ((c = getopt(argc, argv, optstring)) != -1)
if (c == opt) {
has = true;
break;
}

optind = old_optind;
opterr = old_opterr;
return has;
}
#endif /* NO_GUI */

void
options(int argc, char **argv)
{
const int BUFFER_SIZE = 63;
char buf[BUFFER_SIZE+1];
const char *optstring = "n:i:eek::e:d:br";

static ifstream ifs;
static ofstream ofs;
static ofstream efs;

program_name = argv[0];

#ifndef NO_GUI
if (! hasopt(argc, argv, optstring, 'b'))
GUI::init(&argc, argv);
#endif

bool unrecognized = false;

int c;
while ((c = getopt(argc, argv, optstring)) != -1) {
switch (c) {
case 'n':
strncpy(buf, "in/", BUFFER_SIZE);
strncat(buf, optarg, BUFFER_SIZE);
ifs.open(buf);
if (ifs.bad()) {
cerr << program_name;
cerr << ": ERROR(options): ";
cerr << "cannot open input file 'in/"
<< optarg << "'" << endl;
exit(-1);
}
cin = ifs;
strncpy(buf, "out/", BUFFER_SIZE);
strncat(buf, optarg, BUFFER_SIZE);
ofs.open(buf);
if (ofs.bad()) {
cerr << program_name;
cerr << ": ERROR(options): ";
cerr << "cannot open output file 'out/"
<< optarg << "'" << endl;
exit(-1);
}
cout = ofs;
break;
case 'i':
ifs.open(optarg);
if (ifs.bad()) {
cerr << program_name;
cerr << ": ERROR(options): ";
cerr << "cannot open input file '"
<< optarg << "'" << endl;
exit(-1);
}
cin = ifs;
break;
case 'o':
ofs.open(optarg);
if (ofs.bad()) {
cerr << program_name;
cerr << ": ERROR(options): ";
cerr << "cannot open output file '"
<< optarg << "'" << endl;
exit(-1);
}
cout = ofs;
break;
case 'e':
efs.open(optarg);
if (efs.bad()) {
cerr << program_name;
cerr << ": ERROR(options): ";
cerr << "cannot open error file '"
<< optarg << "'" << endl;
exit(-1);
}
cerr = efs;
break;
case 'd':
label_debugging_level = atoi(optarg);
break;
case 'b':
batch = true;
break;
case 'r':
restart = true;
break;
case '?':
unrecognized = true;
break;
}
}

if (unrecognized || optind < argc) {
cerr << "usage: " << program_name;
cerr << " [-n name_of_run]";
cerr << " [-i input_file]";
cerr << " [-o output_file]";
cerr << " [-e error_file]";
cerr << " [-d debug_level]";
cerr << " [-batch]";
cerr << " [-restart]";
cerr << "\n";
exit(-1);
}
}
 
V

Victor Bazarov

kwan said:
As notice, when I do the seek, and replace the full path inside the
soft code, it is not show the error.

So, somehow your compiler does not know where to find headers in the
angle brackets ( said:
I replaced <bool.h> with this
</usr/src/kernels/2.6.9-42.EL-smp-i686/include/config/isdn/capi/capifs/
bool.h
-----------
#include </usr/src/kernels/2.6.9-42.EL-smp-i686/include/config/isdn/
capi/capifs/bool.h>
//#include <trapfpe.h>
#include <stdlib.h>

This is a C form of that header. Consider using said:
#include <iostream.h>

No such standard header. Use said:
#include <getopt.h>
#include <fstream.h>

No such standard header. Use said:
#include <except.h>
#include <label.h>
#include "Problem.h"
#include "Evolution.h"

#ifndef NO_GUI
#include <GUI.h>
#include "Win.h"
#endif

static char *program_name = "evolve";
static bool batch = false;
static bool restart = false; // TODO: use this flag

void options(int argc, char **argv);
void evolve(void);

int
main(int argc, char **argv)
{
[...]

The other headers for which I didn't comment, are non-standard.
Use them at your own risk -- I cannot help you with those, they
are OT unless you provide their contents (but please don't, they
are probably irrelevant for the problem at hand).

V
 
J

Juha Nieminen

kwan said:
I tried to compile C++, but it is not working, I wonder whether the
problem relate to the softcode or there is a way to compile it.
Could you give any hint for the solution? Thank

Is reading what the compiler is telling you really that hard?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top