-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The 'main()' function in svpaint.cpp is overriding my main function #3865
Comments
tesseract 4.x is the unsupported version. Please use the recent tesseract version (5.2).
and there was no problem.
and there is no problem.
Actually, tesseract executable (also 4.x version) has the main function and links to link tesseract library without a problem on any platform... tesseract/src/api/tesseractmain.cpp Line 599 in 82a7a87
|
@zdenop But all your tries were linking tesseract AFTER main.o(or main.cpp), can you try linking tesseract FIRST? This is the default behavior when using CMake: when |
Maybe I am missing something but our cmake builds works:
E.g. https://www.linuxtopia.org/online_books/an_introduction_to_gcc/gccintro_18.html (but also SO ) claims that:
so your propopsed compilation order is not correct. |
Sorry that I messed up some memories about linkers... But the problem still exists and I have found the cause: tesseract/src/viewer/svpaint.cpp Line 230 in 82a7a87
This file is included by Line 406 in 82a7a87
I fed this patch to vcpkg and rebuilt tesseract, then the problem is fixed.
My Qt&CMake project works fine now. Also I guess the similar problem exists for |
|
The Autotools and sw build definitions do not contain an instruction to compile this file. CMakeLists.txt does contain an instruction to compile it. ( Line 565 in a96b2ab
|
An alternative to the suggested changes is to move @stweil, do you have a preference? |
Pull request #3873 should fix this issue. It moves I also considered moving it to |
Environment
Current Behavior:
This example reports linkage error because tesseract41.dll is linked before main.o. But when it is linked to a Qt&CMake project, it is overriding my main function silently and writes
Starting java -Xms512m -Xmx1024m -Djava.library.path=. -jar ./ScrollView.jar
to log.Expected Behavior:
I think shared library should not carry a main function.
The text was updated successfully, but these errors were encountered: