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

[Bug]: VS2019 compile error #153

Open
1 task done
ShiverZm opened this issue Jul 18, 2023 · 2 comments
Open
1 task done

[Bug]: VS2019 compile error #153

ShiverZm opened this issue Jul 18, 2023 · 2 comments
Assignees
Labels

Comments

@ShiverZm
Copy link

bit7z version

3.2.x

Compilation options

BIT7Z_AUTO_FORMAT

7-zip version

v22.01

7-zip shared library used

7z.dll / 7z.so

Compilers

MSVC

Compiler versions

vs2019

Architecture

x86_64

Operating system

Windows

Operating system versions

win10

Bug description

1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cmultivolumeinstream HPP (47, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\cmultivolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cmultivolumeinstream HPP (47, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\cmultivolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cmultivolumeinstream HPP (47, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\cmultivolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\cstdoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\cstdoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\cstdoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/extractcallback HPP (63, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\extractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/extractcallback HPP (63, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\extractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/extractcallback HPP (63, 9) : warning C4183: "MY_UNKNOWN_IMP3" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\extractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source file D:\workspace\github\bit7z\src\internal\fileextractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\fileextractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\fileextractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\cvolumeoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\cvolumeoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\cvolumeoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\fsitem.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\fsitem.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\fsitem.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\cvolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\cvolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\cvolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : error C3646: "HRESULT" : Unknown override specifier (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : error C2143: syntax errors: lack of ";" (in front of "__cdecl") (Compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : warning C4183: "MY_UNKNOWN_IMP3" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49,87) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49,87) : warning C4183: "SetTotal" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : error C2555: "bit7z: : opencallback: : SetTotal" : The overridden virtual function has a different return type and is not from IArchiveOpen

Steps to reproduce

build by below steps:

cd <bit7z folder>
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
cmake --build . -j --config Release

Expected behavior

success

Relevant compilation output

1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cmultivolumeinstream HPP (47, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\cmultivolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cmultivolumeinstream HPP (47, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\cmultivolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cmultivolumeinstream HPP (47, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\cmultivolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\cstdoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\cstdoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\cstdoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/extractcallback HPP (63, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\extractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/extractcallback HPP (63, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\extractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/extractcallback HPP (63, 9) : warning C4183: "MY_UNKNOWN_IMP3" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\extractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source file D:\workspace\github\bit7z\src\internal\fileextractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\fileextractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\fileextractcallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\cvolumeoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\cvolumeoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdoutstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\cvolumeoutstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\fsitem.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\fsitem.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\fsitem.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : error C2144: syntax errors: the front of the "HRESULT" should be ";" (Compile source D:\workspace\github\bit7z\src\internal\cvolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\cvolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/cstdinstream HPP (43, 9) : warning C4183: "MY_UNKNOWN_IMP1" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\cvolumeinstream.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : error C3646: "HRESULT" : Unknown override specifier (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : error C2143: syntax errors: lack of ";" (in front of "__cdecl") (Compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : warning C4183: "MY_UNKNOWN_IMP3" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49,87) : error C4430: lack of type specifier - is assumed to be an int. Note: C++ does not support default int (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49,87) : warning C4183: "SetTotal" : the lack of a return type; Assumed to be a member function that returns "int" (compile source D:\workspace\github\bit7z\src\internal\opencallback.cpp)
1 > D: \ workspace \ lot \ bit7z \ SRC \ internal/opencallback HPP (49, 9) : error C2555: "bit7z: : opencallback: : SetTotal" : The overridden virtual function has a different return type and is not from IArchiveOpen

Code of Conduct

@rikyoz
Copy link
Owner

rikyoz commented Jul 18, 2023

Hi!
Unfortunately, I wasn't able to reproduce your issue!
Do you have the Windows 10 SDK installed on your system? It is usually installed with Visual Studio/MSVC, but if for some reason it is not, you might end up with similar error messages!

@anywhereyang
Copy link
Contributor

@rikyoz @ShiverZm i reproduce your issue! when i try to complie the v4.0,,because i use command " git clone https://github.com/rikyoz/bit7z" to get the code ,but not clone the submodule , and i download the 7zip sdk ,

just use git clone https://github.com/rikyoz/bit7z --recurse ,and no this probelm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants