compilation error message
Hi, any help will be much appreciated.
I'm compiling with the command:
g++ -Wall -o LQueue.C Simulation.C
The message I get is:
Undefined first referenced symbol in file main
Simulation.h
Code:
#include <iostream>
#include <ctime>
#ifndef SIMULATION
#define SIMULATION
#include "LQueue.h"
class Simulation
{
public:
/***** Function Members *****/
/***** Constructor *****/
Simulation();
/*-----------------------------------------------------------
Construct a Simulation object.
Precondition: None.
Postcondition: Input data members have been initialized
with values entered by the user; output data members have
been initialized to 0; and random number generator has
been initialized.
-----------------------------------------------------------*/
/***** Running the simulation *****/
void run();
/*-----------------------------------------------------------
Run the simulation.
Precondition: None.
Postcondition: Simulation of airport runway management
has been completed and performance statistics is
outputted.
-----------------------------------------------------------*/
/***** Output *****/
void display(ostream & out);
/*-----------------------------------------------------------
Display results of the simulation.
Precondition: ostream out is open.
Postcondition: Simulation process is printed.
-----------------------------------------------------------*/
/***** Plane processing *****/
void managePlanes();
/*-----------------------------------------------------------
Manage planes (if any) at the front of landing or takeoff
queues.
Precondition: freeRunway is true.
Postcondition: Planes are dequeued and put on runway.
-----------------------------------------------------------*/
void checkForNewPlane();
/*---------------------------------------------------------------
Check if a new plane has arrived and if so, add it to the
takeoff queue or landing queue depending on different
circumstances. ((STAR - on h/o))
Precondition: none.
Postcondition: takeoff queue or landing queue has been updated.
----------------------------------------------------------------*/
private:
/***** Data Members *****/
//-- Inputs
double takeoffRate; //in terms of hrs
double landingRate; //in terms of hrs
int landTimeDuration; //in terms of mins
int takeoffTimeDuration; //in terms of mins
int lengthOfSimulation; //in mins
//-- Stats
int maxPlanesInLandingQ;
int avgTimeSpentWaitingToLand; //mins
int maxPlanesInTakeoffQ;
int avgTimeSpentWaitingToTakeoff; //mins
int landingTime;
int takeoffTime;
bool freeRunway; //some plane is in the process of landing (or not) (if plane takesoff, it's "done") (TRIANGLED)
int totalMinsWaitingToLand;
int totalMinsWaitingToTakeoff;
Queue takeoffQ;
Queue landingQ;
};
#endif