Hi All,
Apologies if there are multiple psoting of this message.
I want to use the boost::statechart library. However i
encountered a small problem with using the orthogonal regions. In the
statechart
tutorial, every class declaration is put into one file, however i would like to put each class declaration into separate files.
An example ( boost specific headers are omitted for readability reasons,
also .cpp files which contain only test functions):
A.h
#include "Machine.h"
class C;
class B;
class A: public sc::simple_state< A, Machine, mpl::list< C, B > > {};
C.h
#include "A.H"
class C: public sc::simple_state<C, A::orthogonal <0> >
{};
B.h
#include "A.H"
class B: public sc::simple_state<B, A::orthogonal <1> >
{};
Machine.h
class A;
class B;
class Machine : public sc::state_machine<Machine, A> {};
Makefile
CXX = g++-3.4
CFLAG = -c -g -w -O0
OBJECTS = Main.o A.o B.o C.o Machine.o
all: $(OBJECTS)
$(CXX) $(OBJECTS) -o $@
Main.o: Main.cpp
$(CXX) $(CFLAG) $<
A.o: A.cpp A.h
$(CXX) $(CFLAG) $<
B.o: B.cpp B.h
$(CXX) $(CFLAG) $<
C.o
: C.cpp C.h
$(CXX) $(CFLAG) $<
Machine.o: Machine.cpp Machine.h
$(CXX) $(CFLAG) $<
clean:
rm -f *.o a.out
.PHONY: clean
.PHONY: all
Compiling this program fails, containing the following error messages
(we only list an excerpt here):
/usr/include/boost/statechart