bytedance / sonic-cpp

A fast JSON serializing & deserializing library, accelerated by SIMD.
Apache License 2.0
835 stars 101 forks source link

vs2022不能编译过 #32

Open alan0526 opened 1 year ago

alan0526 commented 1 year ago

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 'sonicjson::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: 'alwaysinline': 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: 'sonicjson::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 'sonicjson::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 'sonicjson::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: 'sonicjson::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: 'sonicjson::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: 'sonicjson::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 'sonicjson::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 'sonicjson::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'

liuq19 commented 1 year ago

目前只支持 linux 平台,x86_64 haswell 架构,暂时不支持 msvc

alan0526 commented 1 year ago

有支持的计划吗?

liuq19 commented 1 year ago

有支持的计划吗?

@alan0526 msvc 有计划支持的,也欢迎社区同学一起参与。

gaozilai commented 1 year ago

现在能支持了吗?

wang21825227 commented 9 months ago

@liuq19 windows + clang + x86_64支持吗?