View Single Post
Old 03-18-2018, 08:47 PM   #1534
xilopaint
Junior Member
xilopaint began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2018
Device: none
Quote:
Originally Posted by willus View Post
What instructions are you trying to follow? The instructions I include with the source code say this:
Code:
Build Steps on OS/X (64-bit, gcc 6.2.0, compiled on OSX 10.12 Sierra)
----------------------------------------------------------------------
1. gcc -Ofast -Wall -m64 -o k2pdfopt.o -c k2pdfopt.c

2. g++ -Ofast -m64 -o k2pdfopt k2pdfopt.o -static-libgcc -static-libstdc++ -lk2pdfopt -lwillus -lgocr -ltesseract -lleptonica -ldjvu -lmupdf -lfreetype -ljbig2 -ljpeglib -lopenjpeg -lpng -lzlib -lpthread
The trick is going to be getting all of the libraries to compile. Honestly, I don't think this is worth your effort--you would have to substantially modify the code to really strip out everything but those options. Why not just use the OSX binary? Is the extra size really a problem?
Oh, sorry! I didn't realise I had included a letter "g" at the end of the command. Now I'm getting other error:

Quote:
$ gcc -Ofast -Wall -m64 -o k2pdfopt.o -c k2pdfopt.c
k2pdfopt.c:76:10: fatal error: 'k2pdfopt.h' file not found
#include <k2pdfopt.h>
^~~~~~~~~~~~
1 error generated.
k2pdfopt.h is not in the same path of k2pdfopt.c.

Last edited by xilopaint; 03-18-2018 at 09:03 PM.
xilopaint is offline   Reply With Quote