WINCE 6.0 Openssl编译错误

时间:2014-04-28 13:23:08

标签: compilation openssl windows-ce

我是OpenSSL的新手。我的目标是为WINCE 6.0 OS编译OpenSSL。在Google上花了很多时间之后,我找到了为WINCE 6.0构建OpenSSL的程序。但是我尝试构建wcecompat库是不成功的。以下是我的环境

  • 主机平台:WINDOWS 7
  • Visual Studio:2008
  • TargetCpu:x86

以下是构建wcecompat的步骤:

  1. 从" https://github.com/mauricek/wcecompat/tree/master"下载源代码GIT中。
  2. 使用Visual Studio命令提示符进行构建。声明env跟随变量:

    set OSVERSION=WCE600
    set TARGETCPU=x86
    set PLATFORM=VC-CE

  3. 使用" perl config.pl"创建了make文件。命令。

  4. 执行了nmake命令。
  5. 构建失败,出现编译错误。以下是日志:

    --------------------------------------------------------------------------------------------------
    args.cpp
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(235) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(237) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(239) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(241) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(243) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(245) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(247) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(249) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(251) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(253) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(255) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(257) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(258) : error C2059: syntax error : '('
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(994) : error C2556: 'const wchar_t *wcschr(const wchar_t *,wchar_t)' : overloaded function differs only by return type from 'wchar_t *wcschr(const wchar_t *,wchar_t)'
            include\string.h(36) : see declaration of 'wcschr'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(994) : error C2373: 'wcschr' : redefinition; different type modifiers
            include\string.h(36) : see declaration of 'wcschr'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1026) : error C2556: 'const wchar_t *wcspbrk(const wchar_t *,const wchar_t *)' : overloaded function differs only by return type from 'wchar_t *wcspbrk(const wchar_t *,const wchar_t *)'
            include\string.h(46) : see declaration of 'wcspbrk'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1026) : error C2373: 'wcspbrk' : redefinition; different type modifiers
            include\string.h(46) : see declaration of 'wcspbrk'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1027) : error C2556: 'const wchar_t *wcsrchr(const wchar_t *,wchar_t)' : overloaded function differs only by return type from 'wchar_t *wcsrchr(const wchar_t *,wchar_t)'
            include\string.h(47) : see declaration of 'wcsrchr'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1027) : error C2373: 'wcsrchr' : redefinition; different type modifiers
            include\string.h(47) : see declaration of 'wcsrchr'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1029) : error C2556: 'const wchar_t *wcsstr(const wchar_t *,const wchar_t *)' : overloaded function differs only by return type from 'wchar_t *wcsstr(const wchar_t *,const wchar_t *)'
            include\string.h(49) : see declaration of 'wcsstr'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1029) : error C2373: 'wcsstr' : redefinition; different type modifiers
            include\string.h(49) : see declaration of 'wcsstr'
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1079) : error C2264: 'wcschr' : error in function definition or declaration; function not called
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1081) : error C2264: 'wcspbrk' : error in function definition or declaration; function not called
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1083) : error C2264: 'wcsrchr' : error in function definition or declaration; function not called
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(1085) : error C2264: 'wcsstr' : error in function definition or declaration; function not called
    include\stdio.h(62) : warning C4005: 'stdin' : macro redefinition
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(81) : see previous definition of 'stdin'
    include\stdio.h(63) : warning C4005: 'stdout' : macro redefinition
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(82) : see previous definition of 'stdout'
    include\stdio.h(64) : warning C4005: 'stderr' : macro redefinition
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(83) : see previous definition of 'stderr'
    include\stdio.h(74) : error C2375: 'swprintf' : redefinition; different linkage
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\swprintf.inl(85) : see declaration of 'swprintf'
    include\stdio.h(75) : error C2375: 'vswprintf' : redefinition; different linkage
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\swprintf.inl(97) : see declaration of 'vswprintf'
    include\stdio.h(125) : error C2733: second C linkage of overloaded function '_wfdopen' not allowed
            include\stdio.h(125) : see declaration of '_wfdopen'
    include\stdlib.h(48) : warning C4273: '_wputenv' : inconsistent dll linkage
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(955) : see previous definition of '_wputenv'
    include\stdlib.h(90) : warning C4273: '_ultow' : inconsistent dll linkage
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(884) : see previous definition of '_ultow'
    include\stdlib.h(91) : warning C4273: '_itow' : inconsistent dll linkage
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(878) : see previous definition of '_itow'
    include\stdlib.h(92) : warning C4273: '_ltow' : inconsistent dll linkage
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(881) : see previous definition of '_ltow'
    include\stdlib.h(95) : warning C4273: 'wcstoul' : inconsistent dll linkage
            C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(889) : see previous definition of 'wcstoul'
    c:\workspace\wcecompat-master\src\ts_string.h(106) : warning C4996: 'wcscpy': This function or variable may be unsafe. Consider using wcscpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
            include\string.h(38) : see declaration of 'wcscpy'
    c:\workspace\wcecompat-master\src\ts_string.h(151) : warning C4996: 'wcscat': This function or variable may be unsafe. Consider using wcscat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
            include\string.h(35) : see declaration of 'wcscat'
    ------------------------------------------------------------------------------------------------
    

    我错过了任何配置步骤吗?我现在卡住了两个星期。请帮我解决这个错误。

1 个答案:

答案 0 :(得分:0)

Using Visual Studio Command prompt for build...

C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\wchar.h(235) : error C2059: syntax error : '('
...

看起来您正在使用标准的visual studio命令提示符,而不是交叉编译命令提示符。

您是否安装了Windows Embedded CE 6.0 Platform Builder或Mobile SDK?据我了解,Windows CE仍然受到医疗设备制造商的欢迎(FDA监管医疗设备,他们并不喜欢变化(很像NIST和OpenSSL FIPS验证)。

Platform Builder已获得许可,但Windows Mobile SDK是免费的。我没有Platform Builder的链接,因为我曾经从我的MSDN光盘安装它。以下是Windows Mobile SDK的链接:

(我把这些链接弄得一团糟,现在它们可能很糟糕了。文本文件的日期是从2009/2010开始的。)

SDK应该为您提供交叉编译命令提示。不幸的是,我不记得确切的步骤。我在6年或7年没有使用Windows CE。