Closed md3848 closed 3 years ago
Hi,
Please install VS2019 or VS2022 with C++ workflows or VSxxxx Build Tools (small package). This is needed for sw to work itself.
hi, i have visual studio 2019 v16.8.3 C++ workflows, can u say full name? i cant find this in visual studio installer [ tab : individual components ]
Microsoft changed ABI in VS2019 v16.10. So you need v16.10 atleast.
i have vs 2019 v16.8.3 in my pc - with this situation show this error [ post 1 ]
You need VS v16.10 or later.
I installed Visual Studio 2019 v16.8.3 and did the things I described in post 1 and it showed this error; What is the reason for this error? How do I solve it?
Update VS2019 to v16.10 or later.
k ty - I will do this - and I will tell the result here
i installed "Microsoft Visual Studio 2022 v17.0.1 x64" and problem solved, ty
Tesseract Version: I think the latest version [I use this code, according to what is mentioned in the guide]
git clone https://github.com/tesseract-ocr/tesseract tesseract
SW Version : not sure!, i downloaded this file [ swgui-master-windows-client.zip ] from this link : https://software-network.org/client/ Platform: Window 10 64bitwhy i ask here : in Tesseract git i asked, they told this is sw error.
my question in Tesseract git
i try build Tesseract with this method [ Develop Tesseract ] but when i run this code [ cmake .. ] show this error after a while :
Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: C:/Users/mahdi/.sw/storage/tmp/cfg/581545/loc.sw.self.d6bee8-0.0.28.dll Creating library C:/Users/mahdi/.sw/storage/tmp/cfg/581545/loc.sw.self.d6bee8-0.0.28.lib and object C:/Users/mahdi/.sw/storage/tmp/cfg/581545/loc.sw.self.d6bee8-0.0.28.exp sw.cpp.dc907b35.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<struct sw::builder::Command> & __cdecl sw::driver::CommandBuilder::getCommand(void)" (__imp_?getCommand@CommandBuilder@driver@sw@@QEAAAEAV?$shared_ptr@UCommand@builder@sw@@@std@@XZ) referenced in function "void __cdecl build(struct sw::Build &)" (?build@@YAXAEAUBuild@sw@@@Z) Hint on symbols that are defined and could potentially match: "__declspec(dllimport) public: class std::shared_ptr<struct sw::builder::Command> __cdecl sw::CompilerBaseProgram::getCommand(struct sw::Target const &)" (__imp_?getCommand@CompilerBaseProgram@sw@@QEAA?AV?$shared_ptr@UCommand@builder@sw@@@std@@AEBUTarget@2@@Z) "__declspec(dllimport) public: virtual class std::shared_ptr<struct sw::builder::Command> __cdecl sw::NativeCompiledTarget::getCommand(void)const " (__imp_?getCommand@NativeCompiledTarget@sw@@UEBA?AV?$shared_ptr@UCommand@builder@sw@@@std@@XZ) C:\Users\mahdi\.sw\storage\tmp\cfg\581545\loc.sw.self.d6bee8-0.0.28.dll : fatal error LNK1120: 1 unresolved externals command failed: exit code = 1120 (0x460) Total errors: 1 sw command: F:/Windows/Programing/OpenCV/S.W/OpenCV/4.5.4/libraries/Source File/Tesseract/SW/sw.exe -static -platform x64 -compiler msvc-19.28 -d C:/tesseract/build/.sw/cmake -config d,msr,rwdi,r integrate -cmake-deps C:/tesseract/build/.sw/cmake/sw.txt -cmake-file-version 6 CMake Error at C:/Users/mahdi/.sw/storage/etc/sw/static/SWConfig.cmake:235 (message): sw: non-zero exit code: 1 Call Stack (most recent call first): CMakeLists.txt:349 (sw_execute)
Full code in cmd : cmd.txt
note1 : The code above refers to drive D, but my computer only has drive C and F! note2 : I am trying to build opencv [ with cmake + vs ], but before that I have to build tesseract and then when building opencv with cmake the tesseract inputs ...