Skip to content

Patch for building from source using CMake #2

@GoogleCodeExporter

Description

@GoogleCodeExporter
Just add the attached file into the main directory
(where main.cpp is),
install CMake (apt-get install cmake) and do:

cmake .
make
./openanpr

and you are all set. Here is what the commands produce for me:
https://gist.github.com/certik/8814906

This compiles in Debug mode (no optimizations). To compile with all
optimizations on, do:

cmake -D CMAKE_BUILD_TYPE=Release .
make
./openanpr

But that segfaults, because there is a bug. If you want to fix it,
apply the following patch:

diff --git a/anyoption.h b/anyoption.h
index 96aa919..e4b5216 100755
--- a/anyoption.h
+++ b/anyoption.h
@@ -21,7 +21,7 @@
 #define UNKNOWN_TYPE        5

 #define DEFAULT_MAXOPTS         10
-#define MAX_LONG_PREFIX_LENGTH  2
+#define MAX_LONG_PREFIX_LENGTH  3

 #define DEFAULT_MAXUSAGE        3
 #define DEFAULT_MAXHELP         10

Original issue reported on code.google.com by ondrej.c...@gmail.com on 11 Feb 2014 at 5:46

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions