The compilation notes states that we need to view the Makefile and
specify certain things. The Makefile is like this :
----------------------------------------------------------------------------------
CC = g++
#CC = purify -cache-dir=/tmp/ocrchie/cache
-collector=/usr/sww/lib/gcc-lib/hppa1.1-hp-hpux9.03/2.6.3/ld g++
#CC = quantify -cache-dir=/tmp/ocrchie/cache
-collector=/usr/sww/lib/gcc-lib/hppa1.1-hp-hpux9.03/2.6.3/ld g++
DEBUG = -g
OPTIMIZE = -O
CCFLAGS = $(DEBUG)
EXECUTABLE = ocrchie
# TCL root directory
# on .cs machines
TCLBASE = /usr/sww/tcl-7.4
# X11 root directory
X11BASE = /usr/sww/X11
# math library directory
MATHLIB = /lib/pa1.1
# Place where object files need to be stored
ODIR = /tmp/ocrchie/
# That's it. Now just do a gmake.
INCLUDE = -I${TCLBASE}/include -I${X11BASE}/include
LIBDIRS = -L${TCLBASE}/lib -L${X11BASE}/lib -L${MATHLIB}
LIBS = ${LIBDIRS} -ltk -ltcl -lX11 -lM -ltiff
HEADERS = system.h list.h Component.h \
BitMap.h RLEPair.h RLEMap.h LineMarker.h Page.h
Point.h \
convertMap.h Component.h Word.h tcl_interface.h \
EqnMarker.h Zone.h
OFILES = $(ODIR)main.o $(ODIR)project.o $(ODIR)histogram.o
\
$(ODIR)get_skew.o $(ODIR)tcl_interface.o
$(ODIR)Zone.o \
$(ODIR)RLEMap.o $(ODIR)RLEPair.o $(ODIR)list.o \
$(ODIR)convertMap.o $(ODIR)Component.o
$(ODIR)Page.o\
$(ODIR)BitMap.o $(ODIR)system.o $(ODIR)testocr.o \
$(ODIR)Word.o $(ODIR)learn.o
$(ODIR)status_message.o \
$(ODIR)link.o
#The Executable project
ocrchie: $(OFILES)
$(CC) -g -o $(EXECUTABLE) ${INCLUDE} $(OFILES)
$(LIBS)
# The .o files compiled in ODIR because of space considerations
$(ODIR)link.o: link.cc link.h
$(CC) $(CCFLAGS) ${INCLUDE} -o $(ODIR)link.o -c
link.cc
$(ODIR)status_message.o: status_message.cc status_message.h
$(CC) $(CCFLAGS) -o $(ODIR)status_message.o -c
status_message.cc
$(ODIR)system.o: system.cc $(HEADERS)
$(CC) $(CCFLAGS) -o $(ODIR)system.o -c system.cc
$(ODIR)Page.o: $(HEADERS) Page.cc RLEMap.h RLEPair.h BitMap.h
$(CC) $(CCFLAGS) -o $(ODIR)Page.o -c Page.cc
$(ODIR)RLEMap.o: $(HEADERS) system.cc\
RLEMap.cc RLEPair.cc
$(CC) $(CCFLAGS) -o $(ODIR)RLEMap.o -c RLEMap.cc
$(ODIR)BitMap.o: $(HEADERS) system.cc BitMap.cc
$(CC) $(CCFLAGS) -o $(ODIR)BitMap.o -c BitMap.cc
$(ODIR)RLEPair.o: $(HEADERS) RLEPair.cc
$(CC) $(CCFLAGS) -o $(ODIR)RLEPair.o -c RLEPair.cc
$(ODIR)Component.o: $(HEADERS) Component.cc
$(CC) $(CCFLAGS) -o $(ODIR)Component.o -c Component.cc
$(ODIR)Zone.o: $(HEADERS) Zone.cc
$(CC) $(CCFLAGS) -o $(ODIR)Zone.o -c Zone.cc
$(ODIR)list.o: list.h list.cc
$(CC) $(CCFLAGS) -o $(ODIR)list.o -c list.cc
$(ODIR)Word.o: Word.h Word.cc Component.h list.h list.cc
$(CC) $(CCFLAGS) -o $(ODIR)Word.o -c Word.cc
$(ODIR)convertMap.o: $(HEADERS) convertMap.cc
$(CC) $(CCFLAGS) -o $(ODIR)convertMap.o -c
convertMap.cc
$(ODIR)learn.o: system.h learn.h learn.cc
$(CC) $(CCFLAGS) -o $(ODIR)learn.o -c learn.cc
$(ODIR)main.o: main.cc $(HEADERS)
$(CC) $(CCFLAGS) -o $(ODIR)main.o -c ${INCLUDE} main.cc
$(ODIR)testocr.o: testocr.cc $(HEADERS)
$(CC) $(CCFLAGS) -o $(ODIR)testocr.o -c testocr.cc
$(ODIR)project.o: project.cc project.h bitmap.h histogram.h
$(CC) $(CCFLAGS) -o $(ODIR)project.o -c project.cc
$(ODIR)histogram.o: histogram.cc histogram.h
$(CC) $(CCFLAGS) -o $(ODIR)histogram.o -c histogram.cc
$(ODIR)get_skew.o: get_skew.cc get_skew.h project.h histogram.h
$(CC) $(CCFLAGS) -o $(ODIR)get_skew.o -c get_skew.cc
$(ODIR)tcl_interface.o: tcl_interface.cc tcl_interface.h
$(CC) $(CCFLAGS) -o $(ODIR)tcl_interface.o -c ${INCLUDE}
tcl_interface.cc
#$(ODIR)deskew.o: deskew.cc deskew.h
# $(CC) $(CCFLAGS) -c deskew.cc
#$(ODIR)rotate.o: rotate.cc
# $(CC) $(CCFLAGS) -c rotate.cc
clean:
rm -f core *.o *~
#
--------------------------------------------------------------------------------
So, if the folder does not exist i.e. "sww" isn't available at first,
we need to create the new folder right??
Anyhow, when i try to "gmake project" the output was :
-----------------------------------------------------------------------------------
g++ project.cc -o project
In file included from RLEPair.h:4,
from project.h:4,
from project.cc:4:
list.h:16:18: bool.h: No such file or directory
In file included from RLEPair.h:4,
from project.h:4,
from project.cc:4:
list.h:46: ISO C++ forbids declaration of `insertAfter' with no type
list.h:47: ISO C++ forbids declaration of `insertBefore' with no type
list.h:48: ISO C++ forbids declaration of `remove' with no type
In file included from RLEMap.h:3,
from project.h:5,
from project.cc:4:
system.h:5:43: /usr/sww/share/include/tiffio.h: No such file or
directory
system.h:7:18: bool.h: No such file or directory
In file included from /usr/include/c++/3.2.2/backward/iostream.h:31,
from system.h:8,
from RLEMap.h:3,
from project.h:5,
from project.cc:4:
/usr/include/c++/3.2.2/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 <sstream> instead of
the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.
In file included from system.h:73,
from RLEMap.h:3,
from project.h:5,
from project.cc:4:
BitMap.h:34: ISO C++ forbids declaration of `readBit' with no type
In file included from system.h:74,
from RLEMap.h:3,
from project.h:5,
from project.cc:4:
Component.h:106: `FALSE' was not declared in this scope
Component.h: In member function `bool
Component:
perator<(Component*)':
Component.h:112: `TRUE' undeclared (first use this function)
Component.h:112: (Each undeclared identifier is reported only once for
each
function it appears in.)
Component.h:113: `FALSE' undeclared (first use this function)
In file included from Zone.h:10,
from system.h:80,
from RLEMap.h:3,
from project.h:5,
from project.cc:4:
Page.h: At global scope:
Page.h:26: ISO C++ forbids declaration of `main' with no type
In file included from project.cc:4:
project.h:6:20: bitmap.h: No such file or directory
In file included from project.h:7,
from project.cc:4:
histogram.h:20: ISO C++ forbids declaration of `display' with no type
In file included from project.cc:4:
project.h:10: syntax error before `*' token
project.h:11: `Bitmap' was not declared in this scope
project.h:11: `b' was not declared in this scope
project.h:11: parse error before `)' token
project.h:13: `Bitmap' was not declared in this scope
project.h:13: `b' was not declared in this scope
project.h:13: parse error before `,' token
project.cc:6:20: bitmap.h: No such file or directory
gmake: *** [project] Error 1
--------------------------------------------------------------
if i type just "gmake" instead the output will be :
------------------------------------------------------------------
g++ -g -o /tmp/ocrchie/main.o -c -I/usr/sww/tcl-7.4/include
-I/usr/sww/X11/include main.cc
In file included from main.cc:2:
/usr/include/tk.h:83:29: X11/Xlib.h: No such file or directory
In file included from main.cc:2:
/usr/include/tk.h:581: 'Bool' is used as a type, but is not defined as
a type.
/usr/include/tk.h:582: syntax error before `*' token
/usr/include/tk.h:583: 'Window' is used as a type, but is not defined
as a
type.
/usr/include/tk.h:584: 'Window' is used as a type, but is not defined
as a
type.
/usr/include/tk.h:585: 'Window' is used as a type, but is not defined
as a
type.
/usr/include/tk.h:586: 'Time' is used as a type, but is not defined as
a type.
/usr/include/tk.h:591: 'Bool' is used as a type, but is not defined as
a type.
/usr/include/tk.h:597: 'Bool' is used as a type, but is not defined as
a type.
/usr/include/tk.h:598: syntax error before `*' token
/usr/include/tk.h:599: 'Window' is used as a type, but is not defined
as a
type.
/usr/include/tk.h:657: syntax error before `*' token
/usr/include/tk.h:660: syntax error before `*' token
/usr/include/tk.h:662: 'Window' is used as a type, but is not defined
as a
type.
/usr/include/tk.h:671: 'XWindowChanges' is used as a type, but is not
defined
as a type.
/usr/include/tk.h:673: 'XSetWindowAttributes' is used as a type, but
is not
defined as a type.
/usr/include/tk.h:787: type specifier omitted for parameter `XPoint'
/usr/include/tk.h:787: parse error before `[' token
/usr/include/tk.h:887: type specifier omitted for parameter `Display'
/usr/include/tk.h:887: parse error before `*' token
/usr/include/tk.h:890: type specifier omitted for parameter `Display'
/usr/include/tk.h:890: parse error before `*' token
/usr/include/tk.h:985: syntax error before `*' token
/usr/include/tk.h:1049: 'GC' is used as a type, but is not defined as
a type.
/usr/include/tk.h:1061: syntax error before `*' token
/usr/include/tk.h:1062: syntax error before `*' token
/usr/include/tk.h:1063: syntax error before `*' token
/usr/include/tk.h:1064: 'Pixmap' is used as a type, but is not defined
as a
type.
/usr/include/tk.h:1065: 'Pixmap' is used as a type, but is not defined
as a
type.
/usr/include/tk.h:1066: 'Pixmap' is used as a type, but is not defined
as a
type.
/usr/include/tk.h:1092: type specifier omitted for parameter `Display'
/usr/include/tk.h:1092: parse error before `*' token
/usr/include/tk.h:1094: type specifier omitted for parameter `Display'
/usr/include/tk.h:1094: parse error before `*' token
/usr/include/tk.h:1337: type specifier omitted for parameter
`XErrorEvent'
/usr/include/tk.h:1337: parse error before `*' token
until
/usr/include/tkDecls.h:1072: type specifier omitted for parameter
`Pixmap'
/usr/include/tkDecls.h:1072: parse error before `,' token
/usr/include/tkDecls.h:1073: type specifier omitted for parameter
`XColor'
/usr/include/tkDecls.h:1073: parse error before `*' token
/usr/include/tkDecls.h:1077: type specifier omitted for parameter
`Pixmap'
/usr/include/tkDecls.h:1077: parse error before `)' token
In file included from main.cc:8:
system.h:5:43: /usr/sww/share/include/tiffio.h: No such file or
directory
system.h:7:18: bool.h: No such file or directory
In file included from /usr/include/c++/3.2.2/backward/iostream.h:31,
from system.h:8,
from main.cc:8:
/usr/include/c++/3.2.2/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 <sstream> instead of
the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.
In file included from system.h:72,
from main.cc:8:
list.h:16:18: bool.h: No such file or directory
In file included from system.h:72,
from main.cc:8:
list.h:46: ISO C++ forbids declaration of `insertAfter' with no type
list.h:47: ISO C++ forbids declaration of `insertBefore' with no type
list.h:48: ISO C++ forbids declaration of `remove' with no type
In file included from system.h:73,
from main.cc:8:
BitMap.h:34: ISO C++ forbids declaration of `readBit' with no type
In file included from system.h:74,
from main.cc:8:
Component.h:106: `FALSE' was not declared in this scope
Component.h: In member function `bool
Component:
perator<(Component*)':
Component.h:112: `TRUE' undeclared (first use this function)
Component.h:112: (Each undeclared identifier is reported only once for
each
function it appears in.)
Component.h:113: `FALSE' undeclared (first use this function)
In file included from Zone.h:10,
from system.h:80,
from main.cc:8:
Page.h: At global scope:
Page.h:26: ISO C++ forbids declaration of `main' with no type
main.cc: In function `int main(int, char**)':
main.cc:48: declaration of C function `int main(int, char**)'
conflicts with
Page.h:26: previous declaration `int main()' here
gmake: *** [/tmp/ocrchie/main.o] Error 1
-------------------------------------------------------------------------------