I'm trying to generate an executable file for a C++ script I've been working on but am running into an error,
ParameterTest.cpp:3:10: fatal error:
'3.04.01_2/include/tesseract/baseapi.h' file not found
#include <3.04.01_2/include/tesseract/baseapi.h>
It's weird because I can run the script fine inside Eclipse.
What I'm doing.
- Save and build project in Eclipse C++
g++ ParameterTest.cpp -o output.bin
in command line
Generating an output.bin
executable also works fine when I stop including the libraries.
Could this have to do with the location of the header files or libraries?
Has anyone else had experience with this error?
I'm pretty new to C++ development.
UPDATE
After copying all libraries into the directory, referencing headers with ./...
notation, and then trying to create an executable, I'm running into a different error.
Undefined symbols for architecture x86_64:
"tesseract::TessBaseAPI::GetUTF8Text()", referenced from:
_main in ParameterTest-a6efcb.o
"tesseract::TessBaseAPI::End()", referenced from:
_main in ParameterTest-a6efcb.o
"tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool)", referenced from:
tesseract::TessBaseAPI::Init(char const*, char const*) in ParameterTest-a6efcb.o
"tesseract::TessBaseAPI::SetImage(Pix*)", referenced from:
_main in ParameterTest-a6efcb.o
"tesseract::TessBaseAPI::TessBaseAPI()", referenced from:
_main in ParameterTest-a6efcb.o
"_pixDestroy", referenced from:
_main in ParameterTest-a6efcb.o
"_pixRead", referenced from:
_main in ParameterTest-a6efcb.o
ld: symbol(s) not found for architecture x86_64
I suspect this is related to dynamic library linking.