Skip to content
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

windows build error #4166

Closed
vadiks2003 opened this issue Nov 30, 2023 · 1 comment
Closed

windows build error #4166

vadiks2003 opened this issue Nov 30, 2023 · 1 comment

Comments

@vadiks2003
Copy link

vadiks2003 commented Nov 30, 2023

Current Behavior

i downloaded the recent source files. followed the guide where i downloaded sw and ran sw build inside tesseract folder. ran both sw build and cmake -B buildfolder and tried to run cmake with gcc/g++ yet i get this error

Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:840, function execute1: When executing: [pub.egorpugin.primitives.command-0.3.1]/src/command.cpp
C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(142): error C2039: 'contains': is not a member of 'std::basic_string<char,std::char_traits,std::allocator>'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\xstring(4871): note: see declaration of 'std::basic_string<char,std::char_traits,std::allocator>'
C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): note: see reference to function template instantiation 'auto primitives::Command::setProgram::<lambda_1>::()::<lambda_1>::operator ()<const char(&)[6]>(_T1) const' being compiled
with
[
_T1=const char (&)[6]
]
C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): error C3487: 'bool': all return expressions must deduce to the same type: previously it was 'void'
C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(144): error C3487: 'bool': all return expressions must deduce to the same type: previously it was 'void'
C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(144): error C2562: 'primitives::Command::setProgram::<lambda_1>::()::<lambda_1>::operator ()': 'void' function returning a value
C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): note: see declaration of 'primitives::Command::setProgram::<lambda_1>::()::<lambda_1>::operator ()'
C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): error C2296: '||': illegal, left operand has type 'void'
C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): error C2297: '||': illegal, right operand has type 'void'
command failed: exit code = 2
Total errors: 1
sw command: C:/TestFolderForPaths/sw.exe -static -platform x64 -compiler msvc-19.29 -d C:/Users/vadik/Downloads/tesseract/tesseracte/build/.sw/cmake -config d,msr,rwdi,r integrate -cmake-deps C:/Users/vadik/Downloads/tesseract/tesseracte/build/.sw/cmake/sw.txt -cmake-file-version 9
CMake Error at C:/Users/vadik/.sw/storage/etc/sw/static/SWConfig.cmake:267 (message):
sw: non-zero exit code: 1
Call Stack (most recent call first):
CMakeLists.txt:393 (sw_execute)

Expected Behavior

its expected to build

Suggested Fix

change source code

tesseract -v

No response

Operating System

Windows 10

Other Operating System

No response

uname -a

No response

Compiler

MSVC 2019 14.29.30133

CPU

Intel(R) Core(TM) i5-1035G1 CPU

Virtualization / Containers

No response

Other Information

windows build is 19045.3693 ver 22H2 Windows 10 Pro N

@zdenop
Copy link
Contributor

zdenop commented Dec 1, 2023

C:/Users/vadik/.sw/storage/pkg/9d/a6/8d0d/src/sdir/src/command/src/command.cpp(147): error C2297: '||': illegal, right operand has type 'void'

as you see: this is not tesseract issue but sw - report it there.

@zdenop zdenop closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants