I am having a problem compiling my code. The following error is displayed:
mpixlcxx -c -O3 potentialqueue_local.cpp
mpixlcxx -c -O3 eventqueue.cpp
"eventqueue_remote.h", line 20.36: 1540-0063 (S) The text "eventqueue_t" is unexpected.
make: *** [eventqueue.o] Error 1

I am fairly new to C++ and not sure if the problem is in the makefile or maybe one of my #include statements. Can anyone see the problem?


#ifndef _EVENTQUEUE_H_
#define _EVENTQUEUE_H_

#include <vector>
#include <list>
#undef SEEK_SET
#undef SEEK_END
#undef SEEK_CUR
#include <mpi.h>
#include "event_storage.h"
#include "neuron.h"

#define MAX_EVENT_COUNT 100000

// Base event queue class
class eventqueue_t : public event_storage_t
    typedef std::vector<event_t> moment_t;
    typedef std::vector<moment_t*> events_t;

    // Constructor/Destructor
    eventqueue_t(unsigned int size);
    virtual ~eventqueue_t();
    // Pushing events on the queue
    void push_event(const event_t &signal, unsigned int delay);

	unsigned int get_capacity();

    events_t event_queue;

#endif // _EVENTQUEUE_H_


#include <iostream>
#include "eventqueue.h"
#include "simulation.h"
#include "config.h"

using namespace std;

eventqueue_t::eventqueue_t(unsigned int size) : event_storage_t(size)
    event_queue.resize(size, NULL);

    // Initialize the queue
	int i;
    for(i = 0; i < size; i++) {
		moment_t *moment_p = new moment_t();
		// reserve some events to speed things up
		event_queue[i] = moment_p;

    // Go through the moments
    for(events_t::iterator i = event_queue.begin(); i != event_queue.end(); i++)
	// Delete the moment
	delete *i;

void eventqueue_t::push_event(const event_t &signal, unsigned int delay)
    event_queue[(current_event_index + delay) % queue_size]

unsigned int eventqueue_t::get_capacity()
	int capacity = 0;
	int cycle_index;
    for(cycle_index = 0; cycle_index < queue_size; cycle_index++) {
		capacity += event_queue[cycle_index]->capacity();

	return capacity;



#include "eventqueue.h"

#define LEFT        0
#define RIGHT       1
#define UP          2
#define DOWN        3
#define LEFTUP      4
#define LEFTDOWN    5
#define RIGHTUP     6
#define RIGHTDOWN   7

#define STATS_MSG			1

// Remote machine event queue
class eventqueue_remote_t : public eventqueue_t
    eventqueue_remote_t(unsigned int size, unsigned int _remote_machine_id);

    void communicate_moment(unsigned long step, MPI_Request *requests, int &request_count);
    void execute_moment(unsigned long step);

    unsigned int remote_machine_id;



TARGET = brain
OBJS = brain.o config.o connection.o event_storage.o potentialqueue_local.o eventqueue.o \
	 eventqueue_local.o eventqueue_remote.o main.o neuron.o simulation.o EasyBMP.o
CXX = mpixlcxx

$(TARGET): $(OBJS) combine

combine: combine.o EasyBMP.o
	$(CXX) combine.o EasyBMP.o -o combine

.SUFFIXES:	.o .cpp .h

	$(CXX) -c $(CFLAGS) $*.cpp

	$(CXX) -c $(CFLAGS) $*.cpp

brain.cpp: brain.h config.h simulation.h eventqueue_remote.h neuron.h connection.h potentialqueue_local.h
config.cpp: config.h
connection.cpp: connection.h config.h neuron.h event_storage.h
event_storage.cpp: event_storage.h
eventqueue.cpp: eventqueue.h event_storage.h neuron.h simulation.h config.h
potentialqueue_local.cpp: potentialqueue_local.h event_storage.h eventqueue_remote.h neuron.h config.h
eventqueue_local.cpp: eventqueue_local.h eventqueue.h eventqueue_remote.h neuron.h simulation.h config.h
eventqueue_remote.cpp: eventqueue_remote.h eventqueue.h config.h
main.cpp: brain.h simulation.h config.h
neuron.cpp: neuron.h connection.h config.h potentialqueue_local.h
simulation.cpp: simulation.h brain.h config.h connection.h EasyBMP.o

brain.o: brain.cpp
config.o: config.cpp
connection.o: connection.cpp
event_storage.o: event_storage.cpp
potentialqueue_local.o: potentialqueue_local.cpp
eventqueue.o: eventqueue.cpp
eventqueue_local.o: eventqueue_local.cpp
eventqueue_remote.o: eventqueue_remote.cpp
main.o: main.cpp
neuron.o: neuron.cpp
simulation.o: simulation.cpp

# combine utility

# third party bmp library
EasyBMP.o: easy_bmp/EasyBMP.cpp
	$(CXX) -c $(CFLAGS) easy_bmp/EasyBMP.cpp -o EasyBMP.o

# Cleaning
	rm -f *.o $(TARGET) combine output/* easy_bmp/*.o *~

It seems that the problem was

#include "neuron.h"

from eventqueue.h, but I do not see why it gave that error.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.