Hi Sam,
1. If you installed the OpenC++ 2.8 standard release, you will
probably need to replace it with the latest CVS snapshot:
http://opencxx.sourceforge.net/snapshots/opencxx-20050912.tar.gz
As I recall, the -I flag along with some other stuff is broken in the
standard release.
2. I also recall OpenC++ (any version) being broken for GCC versions
later than 3.4.x. If you get errors parsing the standard C++
libraries, it will be a clue that you need to either hack OpenC++ or
use an earlier version of GCC.
3. I usually compile by doing something like this:
<prefix>/bin/occ2 -Wc,-Wall -I. -I<prefix>/include -c Metaclass1.mc
-o Metaclass1.o
<prefix>/bin/occ2 -Wc,-Wall -I. -I<prefix>/include -c Metaclass2.mc
-o Metaclass2.o
<prefix>/bin/occ2 -Wc,-Wall -I. -I<prefix>/include -c Metaclass3.mc
-o Metaclass3.o
g++ -Wall -o my-compiler Metaclass1.o Metaclass2.o Metaclass3.o
-L<prefix>/lib -locc -lltdl
./my-compiler -I. -c -- -Wall MyClass1.cc
./my-compiler -I. -c -- -Wall MyClass2.cc
./my-compiler -I. -c -- -Wall MyClass3.cc
g++ -Wall -o my-program MyClass1.o MyClass2.o MyClass3.o
I hope this helps.
Cheers, Scott
|