Skip to content

Commit

Permalink
Removed viewer from upstream tesseract lib.
Browse files Browse the repository at this point in the history
I also added the "-all_load" flag to the Template Framework
Project target as well as the TestsProject target and I can
confirm that both build successfully and all the tests run okay.

But I didn't add it to the TestsProjectTests target because I
wasn't sure it belongs there. Feel free to add it there as well
if you think it's needed.
  • Loading branch information
Kevin Conley authored and Kirill Makankov committed Jan 10, 2015
1 parent 5befac2 commit 5006620
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@
OTHER_LDFLAGS = (
"-lstdc++",
"-ObjC",
"-all_load",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
Expand All @@ -335,6 +336,7 @@
OTHER_LDFLAGS = (
"-lstdc++",
"-ObjC",
"-all_load",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
Expand Down
2 changes: 1 addition & 1 deletion TesseractOCR/build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ make clean 2> /dev/null
make distclean 2> /dev/null
eval "setenv_${archs[$n]}"
bash autogen.sh
LIBLEPT_HEADERSDIR=$GLOBAL_OUTDIR/include ./configure --host="${arch_names[$n]}" --enable-shared=no
LIBLEPT_HEADERSDIR=$GLOBAL_OUTDIR/include ./configure --host="${arch_names[$n]}" --enable-shared=no --disable-graphics
make -j12
for i in `find . -name "lib*.a" | grep -v $LOCAL_OUTDIR`; do cp -rvf $i "$LOCAL_OUTDIR/${archs[$n]}"; done
merge_libfiles "$LOCAL_OUTDIR/${archs[$n]}" libtesseract_all.a
Expand Down
2 changes: 1 addition & 1 deletion TesseractOCR/include/tesseract/config_auto.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/* #undef AC_APPLE_UNIVERSAL_BUILD */

/* Disable graphics */
/* #undef GRAPHICS_DISABLED */
#define GRAPHICS_DISABLED /**/

/* Define to 1 if you have the <cairo/cairo-version.h> header file. */
/* #undef HAVE_CAIRO_CAIRO_VERSION_H */
Expand Down
2 changes: 1 addition & 1 deletion TesseractOCR/include/tesseract/genericvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ inline bool LoadDataFromFile(const STRING& filename,
size_t size = ftell(fp);
fseek(fp, 0, SEEK_SET);
// Pad with a 0, just in case we treat the result as a string.
data->init_to_size((int) size + 1, 0);
data->init_to_size(size + 1, 0);
bool result = fread(&(*data)[0], 1, size, fp) == size;
fclose(fp);
return result;
Expand Down
2 changes: 1 addition & 1 deletion TesseractOCR/include/tesseract/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

// Remove newline (if any) at the end of the string.
inline void chomp_string(char *str) {
int last_index = (int) strlen(str) - 1;
int last_index = strlen(str) - 1;
while (last_index >= 0 &&
(str[last_index] == '\n' || str[last_index] == '\r')) {
str[last_index--] = '\0';
Expand Down
Binary file modified TesseractOCR/lib/liblept.a
Binary file not shown.
Binary file modified TesseractOCR/lib/libtesseract_all.a
Binary file not shown.
2 changes: 2 additions & 0 deletions TestsProject/TestsProject.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@
OTHER_LDFLAGS = (
"-lstdc++",
"-ObjC",
"-all_load",
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand All @@ -508,6 +509,7 @@
OTHER_LDFLAGS = (
"-lstdc++",
"-ObjC",
"-all_load",
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down

0 comments on commit 5006620

Please sign in to comment.