gpt4 book ai didi

c++ - 为 WinCE 构建 POCO C++ : winbase. h 相关错误

转载 作者:太空狗 更新时间:2023-10-29 21:38:35 32 4
gpt4 key购买 nike

我正在尝试在 Windows 7 Pro x64 上使用提供的 buildwin.cmd像这样:

buildwin 90 build static_mt both WinCE samples

但是,由于 C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase 中的几个错误,基础库 (Foundation_CE_vs90.vcproj) 的构建失败了。 h,显然需要以下文件:

wce_winbase.c
wce_path.c
wce_directorymanagement.c
wce_clock.c

文件 wce_rewind.c 本身似乎也有些问题。
可能发生了一些微不足道的事情,但我就是找不到。这里附上了输出的一些相关部分(目标 Beckhoff_HMI_700 (x86) 是我感兴趣的 Windows Embedded Compact 7 设备,其 SDK 似乎在我的机器上配置正确 - 我可以提供更多详细信息如果需要的话)。非常感谢大家。

Setting environment for using Microsoft Visual Studio 2008 x86 tools.


########################################################################
####
#### STARTING VISUAL STUDIO BUILD (vs90, WinCE)
####
########################################################################


The following configurations will be built:
debug_static_mt
release_static_mt

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++ Building [CppUnit_CE_vs90.vcproj]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: CppUnit, Configuration: debug_static_mt Beckhoff_HMI_700 (x86) ------
1>Compiling...
1>TextTestResult.cpp
1>TestSuite.cpp
1>TestRunner.cpp
1>TestResult.cpp
1>TestFailure.cpp
1>TestDecorator.cpp
1>TestCase.cpp
1>Generating Code...
1>Compiling...
1>CppUnitException.cpp
1>Creating library...
1>Build log was saved at "file://c:\poco-1.6.1\CppUnit\obj\Beckhoff_HMI_700 (x86)\debug_static_mt\BuildLog.htm"
1>CppUnit - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========




Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: CppUnit, Configuration: release_static_mt Beckhoff_HMI_700 (x86) ------
1>Compiling...
1>TextTestResult.cpp
1>TestSuite.cpp
1>TestRunner.cpp
1>TestResult.cpp
1>TestFailure.cpp
1>TestDecorator.cpp
1>TestCase.cpp
1>Generating Code...
1>Compiling...
1>CppUnitException.cpp
1>Creating library...
1>Build log was saved at "file://c:\poco-1.6.1\CppUnit\obj\Beckhoff_HMI_700 (x86)\release_static_mt\BuildLog.htm"
1>CppUnit - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========




------------------------------------------------------------------------
------------------------------------------------------------------------
---- Done building [CppUnit_CE_vs90.vcproj]
------------------------------------------------------------------------
------------------------------------------------------------------------


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++ Building [Foundation_CE_vs90.vcproj]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: Foundation, Configuration: debug_static_mt Beckhoff_HMI_700 (x86) ------
1>Compiling...
1>Base32Decoder.cpp
1>VarIterator.cpp
1>VarHolder.cpp
1>Var.cpp
1>Void.cpp
1>StringTokenizer.cpp
1>DirectoryIteratorStrategy.cpp
1>NumericString.cpp
1>String.cpp
1>SortedDirectoryIterator.cpp
1>RefCountedObject.cpp
1>NumberParser.cpp
1>NumberFormatter.cpp
1>NestedDiagnosticContext.cpp
1>MemoryPool.cpp
1>FPEnvironment.cpp
1>Format.cpp
1>Exception.cpp
1>Error.cpp
1>Environment.cpp
1>Generating Code...
1>Compiling...
1>Debugger.cpp
1>Checksum.cpp
1>ByteOrder.cpp
1>Bugcheck.cpp
1>AtomicCounter.cpp
1>Generating Code...
1>Compiling...
1>wce_winbase.c
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(238) : error C2016: C requires that a struct or union has at least one member
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(238) : error C2061: syntax error : identifier 'ULONG_PTR'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(239) : error C2061: syntax error : identifier 'InternalHigh'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(239) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(242) : error C2016: C requires that a struct or union has at least one member
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(242) : error C2061: syntax error : identifier 'DWORD'

[...]

1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(418) : error C2061: syntax error : identifier 'VOID'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(418) : fatal error C1003: error count exceeds 100; stopping compilation
1>wce_unlink.c
1>wce_timesys.c
1>wce_time.c
1>wce_strerror.c
1>wce_stat.c
1>wce_setlocale.c
1>wce_rmdir.c
1>wce_rewind.c
1>.\wcelibcex-1.0\src\wce_rewind.c(64) : error C2143: syntax error : missing ')' before '*'
1>.\wcelibcex-1.0\src\wce_rewind.c(64) : error C2143: syntax error : missing '{' before '*'
1>.\wcelibcex-1.0\src\wce_rewind.c(64) : error C2059: syntax error : ')'
1>.\wcelibcex-1.0\src\wce_rewind.c(65) : error C2054: expected '(' to follow 'fp'
1>wce_rename.c
1>wce_path.c
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(238) : error C2016: C requires that a struct or union has at least one member

[...]

1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(436) : fatal error C1003: error count exceeds 100; stopping compilation
1>wce_mktime.c
1>wce_mkdir.c
1>wce_localtime.c
1>wce_lfind.c
1>wce_gettimeofday.c
1>wce_getopt.c
1>wce_getenv.c
1>wce_findfile.c
1>wce_errno.c
1>Generating Code...
1>Compiling...
1>wce_directorymanagement.c
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(238) : error C2016: C requires that a struct or union has at least one member

[...]

1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(418) : fatal error C1003: error count exceeds 100; stopping compilation
1>wce_ctime.c
1>wce_clock.c
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(238) : error C2016: C requires that a struct or union has at least one member

[...]

1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(418) : fatal error C1003: error count exceeds 100; stopping compilation
1>wce_bsearch.c
1>wce_asctime.c
1>.\wcelibcex-1.0\src\wce_asctime.c(124) : warning C4013: 'sprintf' undefined; assuming extern returning int
1>wce_access.c
1>.\wcelibcex-1.0\src\wce_access.c(67) : error C2065: 'SFGAO_READONLY' : undeclared identifier
1>wce_abort.c
1>Generating Code...
1>Compiling...
1>HashStatistic.cpp
1>Hash.cpp
1>EventArgs.cpp
1>TaskNotification.cpp
1>TaskManager.cpp

[...]

1>pcre_exec.c
1>pcre_compile.c
1>Generating Code...
1>Compiling...
1>pcre_chartables.c
1>Generating Code...
1>Compiling...
1>RegularExpression.cpp
1>SharedLibrary.cpp
1>c:\poco-1.6.1\foundation\src\SharedLibrary_WIN32U.cpp(86) : error C3861: 'GetProcAddressW': identifier not found
1>Manifest.cpp
1>SHA1Engine.cpp
1>RandomStream.cpp

[...]

1>Generating Code...
1>Compiling...
1>zutil.c
1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(720) : error C2059: syntax error : '('
1>.\src\zutil.c(147) : error C2072: '_errno' : initialization of a function
1>trees.c
1>inftrees.c
1>inflate.c
1>inffast.c

[...]

1>Base64Decoder.cpp
1>Base32Encoder.cpp
1>Generating Code...
1>Build log was saved at "file://c:\poco-1.6.1\Foundation\obj\Foundation\Beckhoff_HMI_700 (x86)\debug_static_mt\BuildLog.htm"
1>Foundation - 416 error(s), 1 warning(s)
2>------ Build started: Project: TestSuite, Configuration: debug_static_mt Beckhoff_HMI_700 (x86) ------
3>------ Build started: Project: TestApp, Configuration: debug_static_mt Beckhoff_HMI_700 (x86) ------
4>------ Build started: Project: TestLibrary, Configuration: debug_static_mt Beckhoff_HMI_700 (x86) ------
3>Compiling...
4>Compiling...
3>TestApp_WINCE.cpp
4>TestLibrary.cpp
2>Compiling...
2>AnyTest.cpp
2>VarTest.cpp
4>TestPlugin.cpp
4>Generating Code...
3>Linking...
4>Linking...
3>LINK : fatal error LNK1181: cannot open input file 'PocoFoundationmtd.lib'
4>LINK : fatal error LNK1181: cannot open input file 'PocoFoundationmtd.lib'
3>Build log was saved at "file://c:\poco-1.6.1\Foundation\testsuite\obj\TestApp\Beckhoff_HMI_700 (x86)\debug_static_mt\BuildLog.htm"
3>TestApp - 1 error(s), 0 warning(s)
4>Build log was saved at "file://c:\poco-1.6.1\Foundation\testsuite\obj\TestLibrary\Beckhoff_HMI_700 (x86)\debug_static_mt\BuildLog.htm"
4>TestLibrary - 1 error(s), 0 warning(s)
2>DynamicTestSuite.cpp
2>SimpleHashTableTest.cpp
2>LinearHashTableTest.cpp
2>HashTableTest.cpp
2>HashSetTest.cpp
1>inffast.c

[...]

2>ByteOrderTest.cpp
2>AutoReleasePoolTest.cpp
2>AutoPtrTest.cpp
2>ArrayTest.cpp
2>Generating Code...
2>Linking...
2>LINK : fatal error LNK1181: cannot open input file 'PocoFoundationmtd.lib'
2>Build log was saved at "file://c:\poco-1.6.1\Foundation\testsuite\obj\TestSuite\Beckhoff_HMI_700 (x86)\debug_static_mt\BuildLog.htm"
2>TestSuite - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXX BUILD FAILED. EXITING. XXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

最佳答案

您的 SDK 或您使用的包含路径出现问题。 CE 构建不应使用 C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ 下的任何内容;这些是桌面 Windows SDK 的 header 。您的构建使用的 winbase.h 应该来自设备的 SDK 头文件 c:\Program Files (x86)\Windows CE Tools\SDKs\[platform name]\Include\[architecture ]\.

您应该检查桌面 Windows SDK header 是否在您的包含路径中的某个位置并相应地删除它们。由于 CppUnit 似乎正在正确构建并且假设您可以使用相同的设备 SDK 成功构建其他软件,因此首先要在 Foundation_CE_vs90.vcproj 中查找它们。

关于c++ - 为 WinCE 构建 POCO C++ : winbase. h 相关错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35048405/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com