Win SDK 8.0编译错误

时间:2013-09-16 11:21:42

标签: c++ visual-studio winapi visual-studio-2012 ipc

我在我的项目中使用simple-ipc-lib。我有Windows SDK 8.0的Visual Studio 2012。我也有VS2010和Win SDK 7.0。由于一些必要的工作,我有时安装和卸载Visual Studios。

我已经在VS2012中成功构建了simple-ipc-lib。它的单元测试工作正常。

我现在正在尝试用它开发一个应用程序。我在VS2012中创建了一个空项目,包括头文件和lib。但在编译时它会给我带来错误

1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(24): error C2146: syntax error : missing ';' before identifier 'fd1'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(24): warning C4183: 'fd1': missing return type; assumed to be a member function returning 'int'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(25): error C2146: syntax error : missing ';' before identifier 'fd2'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(25): warning C4183: 'fd2': missing return type; assumed to be a member function returning 'int'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(27): error C2146: syntax error : missing ';' before identifier 'OpenPipeServer'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(27): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(27): warning C4183: 'OpenPipeServer': missing return type; assumed to be a member function returning 'int'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(28): error C2146: syntax error : missing ';' before identifier 'OpenPipeClient'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(28): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(28): error C2086: 'int PipePair::HANDLE' : redefinition
1>          C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(27) : see declaration of 'PipePair::HANDLE'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(28): warning C4183: 'OpenPipeClient': missing return type; assumed to be a member function returning 'int'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(31): error C2146: syntax error : missing ';' before identifier 'srv_'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(31): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(32): error C2146: syntax error : missing ';' before identifier 'cln_'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(32): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(24): error C2065: 'srv_' : undeclared identifier
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(25): error C2065: 'cln_' : undeclared identifier
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(40): error C2061: syntax error : identifier 'HANDLE'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(41): error C2061: syntax error : identifier 'HANDLE'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(49): error C2146: syntax error : missing ';' before identifier 'pipe_'
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(46): error C2065: 'INVALID_HANDLE_VALUE' : undeclared identifier
1>C:\CEF\simple-ipc-lib\V8_ipc\deps\simple-ipc-lib-read-only\src\pipe_win.h(46): error C2065: 'pipe_' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(46): error C2146: syntax error : missing ';' before identifier 'nLength'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(46): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(47): error C2146: syntax error : missing ';' before identifier 'lpSecurityDescriptor'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(47): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(48): error C2146: syntax error : missing ';' before identifier 'bInheritHandle'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(48): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(52): error C2146: syntax error : missing ';' before identifier 'Internal'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(53): error C2146: syntax error : missing ';' before identifier 'InternalHigh'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(53): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(56): error C2146: syntax error : missing ';' before identifier 'Offset'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(56): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(57): error C2146: syntax error : missing ';' before identifier 'OffsetHigh'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(59): error C2146: syntax error : missing ';' before identifier 'Pointer'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(59): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(62): error C2146: syntax error : missing ';' before identifier 'hEvent'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(62): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(66): error C2146: syntax error : missing ';' before identifier 'lpCompletionKey'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(66): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(68): error C2146: syntax error : missing ';' before identifier 'Internal'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(68): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(69): error C2146: syntax error : missing ';' before identifier 'dwNumberOfBytesTransferred'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(69): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(80): error C2146: syntax error : missing ';' before identifier 'dwLowDateTime'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(80): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(81): error C2146: syntax error : missing ';' before identifier 'dwHighDateTime'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(81): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(90): error C2146: syntax error : missing ';' before identifier 'wYear'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(90): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(91): error C2146: syntax error : missing ';' before identifier 'wMonth'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(91): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(92): error C2146: syntax error : missing ';' before identifier 'wDayOfWeek'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(92): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(93): error C2146: syntax error : missing ';' before identifier 'wDay'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(93): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(94): error C2146: syntax error : missing ';' before identifier 'wHour'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(94): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(95): error C2146: syntax error : missing ';' before identifier 'wMinute'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(95): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(96): error C2146: syntax error : missing ';' before identifier 'wSecond'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(96): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(97): error C2146: syntax error : missing ';' before identifier 'wMilliseconds'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(97): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(102): error C2146: syntax error : missing ';' before identifier 'dwFileAttributes'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(102): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(106): error C2146: syntax error : missing ';' before identifier 'nFileSizeHigh'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(106): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(107): error C2146: syntax error : missing ';' before identifier 'nFileSizeLow'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(107): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(108): error C2146: syntax error : missing ';' before identifier 'dwReserved0'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(108): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(109): error C2146: syntax error : missing ';' before identifier 'dwReserved1'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(109): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(110): error C2146: syntax error : missing ';' before identifier 'cFileName'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(110): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(110): error C2065: 'MAX_PATH' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(111): error C2146: syntax error : missing ';' before identifier 'cAlternateFileName'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(111): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(119): error C2146: syntax error : missing ';' before identifier 'dwFileAttributes'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(119): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(123): error C2146: syntax error : missing ';' before identifier 'nFileSizeHigh'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(124): error C2146: syntax error : missing ';' before identifier 'nFileSizeLow'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(124): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(125): error C2146: syntax error : missing ';' before identifier 'dwReserved0'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(125): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(126): error C2146: syntax error : missing ';' before identifier 'dwReserved1'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(126): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(127): error C2146: syntax error : missing ';' before identifier 'cFileName'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(127): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(127): error C2065: 'MAX_PATH' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(128): error C2146: syntax error : missing ';' before identifier 'cAlternateFileName'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(128): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(198): error C2146: syntax error : missing ';' before identifier 'CRITICAL_SECTION'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(198): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(199): error C2146: syntax error : missing ';' before identifier 'PCRITICAL_SECTION'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(199): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(202): error C2146: syntax error : missing ';' before identifier 'CRITICAL_SECTION_DEBUG'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(202): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(203): error C2146: syntax error : missing ';' before identifier 'PCRITICAL_SECTION_DEBUG'
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(203): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(208): error C2065: 'WINAPI' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(208): error C2065: 'LPOVERLAPPED_COMPLETION_ROUTINE' : undeclared identifier
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(208): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\minwinbase.h(208): fatal error C1903: unable to recover from previous error(s); stopping compilation

Simple IPC lib的单独编译正在进行中。我无法理解这里的错误。请帮忙。

提前致谢。

0 个答案:

没有答案