tasen / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

Cygwin-specific instructions inside Makefile inconsistent with README.html #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Line 122 in src/Makefile reads: on cygwin, comment out viewfiles.c
2. Compare to 6.(b)(1) in README.html
3. Line 122 should read: on cygwin, delete viewfiles.c

What is the expected output? 
A liblept.a which includes writefile.o (includes a reference to _pixWrite)

What do you see instead?
If the viewfiles.c line is commented out instead of deleted, GNU make will
also omit writefile.c from the build because it respects the escaped
newline in the comment.  liblept.a still builds successfully but when
linked to other code (such as in prog) this error results:
liblept.a(readfile.o):readfile.c:(.text+0x5c6): undefined reference to
`_pixWrite'

What version of the product are you using? 
leptonlib-1.37

On what operating system?
WinXP SP2 with Cygwin DLL 1.5.21 (GCC 3.4.4 and GNU Make 3.81)

Please provide any additional information below.
1. Used g++ for CC instead of gcc.  If g++ is used in src/Makefile but not
in prog/Makefile, this error occurs:
adaptmaptest.c:1: warning: -fPIC ignored for target (all code is position
independent)
make: *** [adaptmaptest.o] Error 1

2. README.html has as a minor typo: 
"source list IPLIB_C" 
  should read 
"source list LEPTLIB_C"

Original issue reported on code.google.com by georgeth...@gmail.com on 23 Aug 2006 at 6:50

GoogleCodeExporter commented 8 years ago
The problems noted above have been fixed, and can be
downloaded in v. 1.39.

(1) src/Makefile and prog/Makefile have been edited to
include instructions for modifying each of these
Makefiles, for use in cygwin.

(2) I have verified that if the instructions are followed,
you can make liblept.a in src and all (but 6) of the executables
in prog.  Also verified that if you make src/xtractprotos.exe,
it works properly to generate leptprotos.h.

(The six executables that can't be made all require functions
in viewfiles.c, which are not compiled into liblept.a.)

(3) Have updated the documentation in README.html as well,
including fixing the typo noted above.

Original comment by dan.bloo...@gmail.com on 7 Sep 2006 at 11:53