vs2022不能编译过
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- build-system
Research direction
Reproduce the VS2022 build first, then inspect the reported errors in include/sonic/allocator.h, include/sonic/error.h, and include/sonic/writebuffer.h, along with tests/document_test.cpp. Compare the compiler-specific failures and missing dirent.h issue across the test files. Done means the listed tests compile successfully under VS2022.
Written by the indexing model from the issue text.
Description
F:\work\github\sonic-cpp\include\sonic/allocator.h(92,9): error C3861: 'builtin_ia32_pause': identifier not found
1>assert_test.cpp
1>document_test.cpp
1>F:\work\github\sonic-cpp\tests\document_test.cpp(17,10): fatal error C1083: Cannot open include file: 'dirent.h': No such file or directory
1>error_test.cpp
1>F:\work\github\sonic-cpp\include\sonic/error.h(95,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/error.h(95,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/error.h(95,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/error.h(96,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/error.h(96,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/error.h(96,3): error C2535: 'int sonic_json::ParseResult::attribute(void)': member function already defined or declared
1>F:\work\github\sonic-cpp\include\sonic/error.h(95,3): message : see declaration of 'sonic_json::ParseResult::attribute'
1>F:\work\github\sonic-cpp\include\sonic/error.h(96,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/allocator.h(92,9): error C3861: 'builtin_ia32_pause': identifier not found
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(49,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(49,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(49,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(55,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(55,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(55,3): error C2535: 'int sonic_json::WriteBuffer::attribute(void)': member function already defined or declared
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(49,3): message : see declaration of 'sonic_json::WriteBuffer::attribute'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(55,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(56,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(56,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(56,3): error C2535: 'int sonic_json::WriteBuffer::attribute(void)': member function already defined or declared
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(49,3): message : see declaration of 'sonic_json::WriteBuffer::attribute'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(56,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(57,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(57,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(57,3): error C2535: 'int sonic_json::WriteBuffer::attribute(void)': member function already defined or declared
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(49,3): message : see declaration of 'sonic_json::WriteBuffer::attribute'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(57,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(63,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(63,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(63,3): error C2535: 'int sonic_json::WriteBuffer::attribute(void)': member function already defined or declared
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(49,3): message : see declaration of 'sonic_json::WriteBuffer::attribute'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(63,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(78,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(78,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(78,3): error C2535: 'int sonic_json::WriteBuffer::attribute(void)': member function already defined or declared
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(49,3): message : see declaration of 'sonic_json::WriteBuffer::attribute'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(78,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(85,3): error C2988: unrecognizable template declaration/definition
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(85,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(85,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(85,37): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(96,3): error C2988: unrecognizable template declaration/definition
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(96,3): error C2059: syntax error: '('
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(96,3): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(96,3): error C2059: syntax error: ')'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(97,10): error C2061: syntax error: identifier 'n'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(97,16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(98,17): error C2061: syntax error: identifier 'top'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(98,10): error C2838: 'memcpy': illegal qualified name in member declaration
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(99,10): error C2988: unrecognizable template declaration/definition
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(99,10): error C2143: syntax error: missing ';' before '+='
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(99,10): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(99,14): error C2238: unexpected token(s) preceding ';'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(101,3): error C2065: 'always_inline': undeclared identifier
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(101,3): error C7525: inline variables require at least '/std:c++17'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(101,22): error C2144: syntax error: 'void' should be preceded by ';'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(102,17): error C2065: 'top': undeclared identifier
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(103,5): error C2065: 'top': undeclared identifier
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(28,48): error C2614: 'sonic_json::WriteBuffer': illegal member initialization: 'cap' is not a base or member
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(31,18): error C2039: 'buf_': is not a member of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(26,7): message : see declaration of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(31,34): error C2039: 'top_': is not a member of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(26,7): message : see declaration of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(31,50): error C2039: 'cap_': is not a member of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(26,7): message : see declaration of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(31,9): error C2614: 'sonic_json::WriteBuffer': illegal member initialization: 'buf_' is not a base or member
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(31,25): error C2614: 'sonic_json::WriteBuffer': illegal member initialization: 'top_' is not a base or member
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(31,41): error C2614: 'sonic_json::WriteBuffer': illegal member initialization: 'cap_' is not a base or member
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(32,9): error C2039: 'setZero': is not a member of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(26,7): message : see declaration of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(34,30): error C2065: 'buf_': undeclared identifier
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(38,5): error C2065: 'buf_': undeclared identifier
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(38,16): error C2039: 'buf_': is not a member of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(26,7): message : see declaration of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(39,5): error C2065: 'top_': undeclared identifier
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(39,16): error C2039: 'top_': is not a member of 'sonic_json::WriteBuffer'
1>F:\work\github\sonic-cpp\include\sonic/writebuffer.h(26,7): message : see declaration of 'sonic_json::WriteBuffer'
- Dominant language
- C++
- Stars
- 976
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytedance/sonic-cpp
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
请问下,下个release版本有规划了吗 Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
对 parseImpl 进行优化 Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
sonic 能在 mac 上测试吗 Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
U64toa 单元测试用例不通过 Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in bytedance/sonic-cpp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main Openai_reviewed
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ydb-platform/ydb#53974 · 3 comments ·