Open tlimkim opened 6 years ago
Try OpenCV's ENABLE_CXX11=ON
CMake flag.
Thanks for replying.
I set CMake flag but it didn't work. Instead of doing that, I added a line of code that enable to compile c++11 in CMakeLists.txt
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
When I added this line and compile the OpenCV, there was no problem while compiling the headerfile of Tesseract.
Can I make a pull request about this issue?
I set CMake flag but it didn't work.
Did you see this CMake output (without your patch)?
-- C/C++:
-- Built as dynamic libs?: YES
-- C++11: YES <---------------------
-- C++ Compiler: /usr/bin/c++ (ver 5.4.0)
I saw that CMake output which is
C++11: YES
but it didn't affect compiling the OpenCV with Tesseract header files.
So I thought that there is a problem.. because there is correct for CMake output on C++11 but it doesn't work for actual compiling.
Run make VERBOSE=1
and check passed compiler options (for -std=c++11
).
BTW, Did you have enable precompiled headers?
3.4.0
There was an issue with PCH processing (CMake doesn't provide native PCH support). Check this commit: https://github.com/opencv/opencv/commit/2aa18ca3e93a1a32fec2c063010b72335ac795e9#diff-980653262620d7624fd21ad16af8796f (available in 3.4.1)
In my cmake PCH source code (forked from few days ago), there isn't the codes that above issue.
What is the difference between modify CMakeList.txt and above issue?
System information (version)
Detailed description
Hello.
When I build the OpenCV, there is a compile error: ‘nullptr’ was not declared in this scope (see below for details). I think there is a problem with 'tesseract' that is support c++11.
If anyone who has an idea, please help this problem.
Thanks.