An Extensible Optical Character Recognition Framework


I'm encountering "multiple definition of" linking errors

Although this can happen for many reasons, the architecuture of Conjecture is such that if you are not aware of what Conjecture is doing, multiple-definition-of errors will often occur.

The src/ directory contains subdirectories defining all of the C++ classes necessary to compile Conjecture. The src/Makefile is designed to automatically maintain all dependencies between files, and to ensure that a file is always compiled if any file it depends on is modified. Note that this is the purpose of a Makefile, but few Makefiles actually take care to ensure that all dependencies are accounted for.

It is important to remember note that the Makefile finds and compiles EVERY *.cc file in the entire directory hierarchy (i.e. all sub-directories are searched too). This means that you cannot create a "backup" or "old" directory within src; such code will be automatically detected and compiled by the Makefile. Since backups imply that there is a "non-backup" that presumably defines the same class(es), the Makefile will encounter multiple definitions of the same class and naturally generate "multiple definition of" errors.

The current solution is to put all backups outside the src/ directory. As a trivial future-works project, extensions can be added to src/Makefile to ignore certain directory names within the src/ directory hierarchy.

When I use 'make <target>', unexpected things happen

The src directory has multiple sub-directories (and sub-sub-directories, etc.), but all directories contribute to the overall conjecture executable. Currently, subdirectory Makefiles usually perform a simple delegation of targets to the src/Makefile. For most targets, this produces the desired behavior, but some special-case targets need to be addressed specially, and you may encounter a target that doesn't do what you expect it to.

This "problem" may or may not go away when we move to an autoconf environment. The "inheritance" of targets has advantages that compensate for this (presumably rare) potential problem.

Quick Links

  Downloads : V-0.06
  Howto : Install
  Community : Mailing List
  To Do : Questions
Design Implementation Infrastructure

Conjecture is using services provided by SourceForge