行情开发实例编译错误问题

Discussion in 'CTP' started by anthem16, Oct 27, 2009.

  1. C++太多年没碰了,希望大哥大姐小弟小妹们包含幼稚问题
    我用VS2008打开project, 版本不同所以进行转换,之后直接编译,出现错误

    1>Project : error PRJ0019: 某个工具从以下位置返回了错误代码: "正在执行生成后事件..." 找了一圈google也没搞定 :( 谁能帮个忙


    具体的log文件是:
    ------------------------------
    生成日志


    重新生成 已启动: 项目: testMdUserApi,配置: Debug|Win32

    命令行


    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000117842208.rsp”,其内容为
    [
    /Od /I ".\ThostTraderApi\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /c /Wp64 /ZI /TP .\testMdApi.cpp

    .\MdSpi.cpp
    ]
    正在创建命令行“cl.exe @e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000117842208.rsp /nologo /errorReport:prompt”
    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000217842208.rsp”,其内容为
    [
    /Od /I ".\ThostTraderApi\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Yc"stdafx.h" /Fp"Debug\testMdUserApi.pch" /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /c /Wp64 /ZI /TP .\stdafx.cpp
    ]
    正在创建命令行“cl.exe @e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000217842208.rsp /nologo /errorReport:prompt”
    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\TMP00000317842208.tmp”,其内容为
    [
    1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ ".\\Debug\\testMdUserApi.exe.embed.manifest"
    ]
    正在创建命令行“rc.exe /fo".\Debug\testMdUserApi.exe.embed.manifest.res" e:\Trading\ChinaFuture\QuoteSample\Debug\TMP00000317842208.tmp”
    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000417842208.rsp”,其内容为
    [
    /OUT:"e:\Trading\ChinaFuture\QuoteSample\bin\testMdUserApi.exe" /INCREMENTAL /MANIFEST /MANIFESTFILE:"Debug\testMdUserApi.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"e:\Trading\ChinaFuture\QuoteSample\bin\testMdUserApi.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE:NO /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

    ".\ThostTraderApi\thostmduserapi.lib"

    ".\Debug\MdSpi.obj"

    ".\Debug\stdafx.obj"

    ".\Debug\testMdApi.obj"

    ".\Debug\testMdUserApi.exe.embed.manifest.res"
    ]
    正在创建命令行“link.exe @e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000417842208.rsp /NOLOGO /ERRORREPORT:pROMPT”
    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000517842208.rsp”,其内容为
    [
    /out:.\Debug\testMdUserApi.exe.embed.manifest /notify_update /manifest

    .\Debug\testMdUserApi.exe.intermediate.manifest
    ]
    正在创建命令行“mt.exe @e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000517842208.rsp /nologo”
    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\BAT00000617842208.bat”,其内容为
    [
    @echo 清单资源上次更新时间为 %TIME%,更新位置为 %DATE% > .\Debug\mt.dep
    ]
    正在创建命令行“e:\Trading\ChinaFuture\QuoteSample\Debug\BAT00000617842208.bat”
    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\TMP00000717842208.tmp”,其内容为
    [
    1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ ".\\Debug\\testMdUserApi.exe.embed.manifest"
    ]
    正在创建命令行“rc.exe /fo".\Debug\testMdUserApi.exe.embed.manifest.res" e:\Trading\ChinaFuture\QuoteSample\Debug\TMP00000717842208.tmp”
    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000817842208.rsp”,其内容为
    [
    /OUT:"e:\Trading\ChinaFuture\QuoteSample\bin\testMdUserApi.exe" /INCREMENTAL /MANIFEST /MANIFESTFILE:"Debug\testMdUserApi.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"e:\Trading\ChinaFuture\QuoteSample\Bin\testMdUserApi.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE:NO /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

    ".\ThostTraderApi\thostmduserapi.lib"

    ".\Debug\MdSpi.obj"

    ".\Debug\stdafx.obj"

    ".\Debug\testMdApi.obj"

    ".\Debug\testMdUserApi.exe.embed.manifest.res"
    ]
    正在创建命令行“link.exe @e:\Trading\ChinaFuture\QuoteSample\Debug\RSP00000817842208.rsp /NOLOGO /ERRORREPORT:pROMPT”
    正在创建临时文件“e:\Trading\ChinaFuture\QuoteSample\Debug\BAT00000917842208.bat”,其内容为
    [
    @echo off

    copy .\ThostTraderApi\thosttraderapi.dll .\bin\

    if errorlevel 1 goto VCReportError

    goto VCEnd

    :VCReportError

    echo Project : error PRJ0019: 某个工具从以下位置返回了错误代码: "正在执行生成后事件..."

    exit 1

    :VCEnd
    ]
    正在创建命令行“e:\Trading\ChinaFuture\QuoteSample\Debug\BAT00000917842208.bat”

    输出窗口


    正在编译...
    cl: 命令行 warning D9035 :“Wp64”选项已否决,并将在将来的版本中移除
    stdafx.cpp
    正在编译...
    cl: 命令行 warning D9035 :“Wp64”选项已否决,并将在将来的版本中移除
    MdSpi.cpp
    testMdApi.cpp
    正在生成代码...
    正在编译资源清单...
    Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
    Copyright (C) Microsoft Corporation. All rights reserved.
    正在链接...
    正在嵌入清单...
    Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
    Copyright (C) Microsoft Corporation. All rights reserved.
    正在执行生成后事件...
    系统找不到指定的文件。
    Project : error PRJ0019: 某个工具从以下位置返回了错误代码: "正在执行生成后事件..."

    结果


    生成日志保存在“file://e:\Trading\ChinaFuture\QuoteSample\Debug\BuildLog.htm”
    testMdUserApi - 1 个错误,0 个警告
    -----------------------------
     
  2. 检查运行环境
     
  3. 这个错误是可以忽略的,它说明编译和连接已经成功,结果程序也已经生成,只是在编译连接完成后的“生成后事件”中定义的命令产生执行错误。
    其实,你只要在“工程/属性”对话框中的“配置属性-》生成事件-》生成后事件”中看一下,就可以知道,它就是把“thostmduserapi.dll”拷贝到“bin”目录下,只是由于命令行中的文件路径不对,致使产生错误。
    你只要手工拷贝这个文件就可以了。