DirectX SDK April 2005 在旧版本的VC6中可能造成编译问题(转自http://7622.com/list/54782.htm)

本文主要是介绍DirectX SDK April 2005 在旧版本的VC6中可能造成编译问题(转自http://7622.com/list/54782.htm),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

http://7622.com/list/54782.htm

使用 DirectInput  的  IDirectInputDevice8::SetDataFormat  可能无法正常编译。

dinput8.lib(dilib2.obj) : fatal error LNK1103: debugging information corrupt; recompile module

去掉使用它的那句话就没有问题了。原因在于使用了新版的DIrextX SDK (April 2005 ).

解决方法:
备份 Dxerr9.lib dinput8.lib  使用旧版的文件进行替换(比如 October 2004)。

网上找到的资料,原文:

You should have upgraded from VS6 to .Net 2003 by now. I am only doing this excercise because of some legacy apps that I have. Also, VS 2005 is currently at Beta 2 and some of you on the fence may just want to wait until it rolls before moving on from VS6 because it is pointless moving to .Net 2003 now (if you haven't already) with VS 2005 so close to release. So, don't take this post as an endorsement to not upgrade from VS6.

First things first. Don't even think of trying to use the latest June 2005 SDK. It won't work. Trust me on this. Smile


  1. Download the April 2005 DirectX SDK (scroll down the page to the "Older SDK Releases" section
  2. Download the April 2005 MS Platform SDK (scroll down the page and download PSDK-x86.exe)
  3. Go to Keith's site and download the April or June DirectX 9.0c D3DX Only Installer Download
  4. Assuming that you are using the Summer or October 2004 DirectX SDK, go to the
    Lib folder and copy the Dxerr9.lib and Dinput8.lib files to a temp folder.
  5. Uninstall the current DirectX SDK.
  6. Install the MS Platform SDK (assuming you don't already have the latest version installed)
  7. Install the April 2005 DirectX SDK
  8. Install the D3DX runtime files you downloaded from Keith's site
  9. Reboot
  10. Go to the Lib/x86/ folder where you installed the April 2005 SDK and backup the Dxerr9.lib and dinput8.lib files
  11. Copy the Dxerr9.lib and dinput8.lib files from your previous Summer 2004 or October 2004 into the /Lib/x86 folder.

    In the case of the Dxerr9.lib file, the reason for this is that MS compiled that library (don't ask me why they did this with only this file) with buffer overrun/security checking (as they do with all their .Net libs now,
    hence the reason VS6 no longer works with DX) and any library function which makes calls to that library (e.g. to DXGetErrorString9) will cause linker errors
    e.g.
    Code:

    Linking...
    dxerr9.lib(dxerr9.obj) : error LNK2001: unresolved external symbol ___security_cookie
    dxerr9.lib(dxerr9.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4


    In the case of the dinput8.lib file, you will get this error when compiling a debug app. For some unGodly reason, this file seems to contain corrupt and/or incorrect debugging information. So you will see something like this if you don't use the older version. Incidentally, when comparing these legacy files, in April 2005 SDK, MS decided to include versions that are older than those in the October 2004 Update. Don't ask.

    Code:

    Linking...
    dinput8.lib(dilib2.obj) : fatal error LNK1103: debugging information corrupt; recompile module
    Error executing link.exe.


  12. Start VS6 and go to Tools/Options/Directories. Make sure that the folder order is as indicated below. If any folder is not there, you need to add it. This is the order in which they need to appear.

    Include files:

    DirectX include folder
    MS Platform SDK include folder
    MS VC98 include folder
    MS VC98 MFC include folder
    MS VC98 ATL include folder

    Library files:

    DirectX lib folder
    MS VC98 lib folder
    MS VC98 MFC lib folder



    Couple of things to note:


    1. Keith states on his site that the April 2005 SDK works with VS6; which is why I decided to try it for this legacy app which I still had using the October 2004 SDK. I've sent him email letting him know that it doesn't quite work without the tinkering indicated above.
    2. DirectShow is now in the MS Platform SDK. If you had modules which were based off any of its samples, you will have to modify them to work. e.g. this legacy app I was trying to build, was using an AVI player based on the original cutscene.cpp sample program included with DirectShow. Now that file has been moved into the /Microsoft Platform SDK/Samples/Multimedia/DirectShow/Players/Cutscene folder. It has been modified to work with later DX and MS PSDK builds, so your legacy app won't work without revision. e.g. you will get linker errors like lstrcpy_instead_use_StringCbCopy_or_StringCchCopy or wsprintf_instead_use_StringCbPrintf_or_StringCchPrintf etc because the older versions of some DirectShow samples, did stuff like:

      Code:

      wsprintf(szTitle, TEXT("%s: /0"), CUTSCENE_NAME);
       _vsntprintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);


      which have now been changed to:

      Code:

      (void)StringCchPrintf(szTitle, NUMELMS(szTitle), TEXT("%s: /0"), CUTSCENE_NAME);
      (void)StringCchVPrintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);


      You will have to revise your DirectShow sources to match the changes in the new samples in order to get them to work. Thats what I had to do with that one DirectShow sample (cutscene.cpp) that my player was based on.
    3. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  13. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  14. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  15. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • Start VS6 and go to Tools/Options/Directories. Make sure that the folder order is as indicated below. If any folder is not there, you need to add it. This is the order in which they need to appear.

    Include files:

    DirectX include folder
    MS Platform SDK include folder
    MS VC98 include folder
    MS VC98 MFC include folder
    MS VC98 ATL include folder

    Library files:

    DirectX lib folder
    MS VC98 lib folder
    MS VC98 MFC lib folder



    Couple of things to note:


    1. Keith states on his site that the April 2005 SDK works with VS6; which is why I decided to try it for this legacy app which I still had using the October 2004 SDK. I've sent him email letting him know that it doesn't quite work without the tinkering indicated above.
    2. DirectShow is now in the MS Platform SDK. If you had modules which were based off any of its samples, you will have to modify them to work. e.g. this legacy app I was trying to build, was using an AVI player based on the original cutscene.cpp sample program included with DirectShow. Now that file has been moved into the /Microsoft Platform SDK/Samples/Multimedia/DirectShow/Players/Cutscene folder. It has been modified to work with later DX and MS PSDK builds, so your legacy app won't work without revision. e.g. you will get linker errors like lstrcpy_instead_use_StringCbCopy_or_StringCchCopy or wsprintf_instead_use_StringCbPrintf_or_StringCchPrintf etc because the older versions of some DirectShow samples, did stuff like:

      Code:

      wsprintf(szTitle, TEXT("%s: /0"), CUTSCENE_NAME);
       _vsntprintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);


      which have now been changed to:

      Code:

      (void)StringCchPrintf(szTitle, NUMELMS(szTitle), TEXT("%s: /0"), CUTSCENE_NAME);
      (void)StringCchVPrintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);


      You will have to revise your DirectShow sources to match the changes in the new samples in order to get them to work. Thats what I had to do with that one DirectShow sample (cutscene.cpp) that my player was based on.
    3. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • Start VS6 and go to Tools/Options/Directories. Make sure that the folder order is as indicated below. If any folder is not there, you need to add it. This is the order in which they need to appear.

    Include files:

    DirectX include folder
    MS Platform SDK include folder
    MS VC98 include folder
    MS VC98 MFC include folder
    MS VC98 ATL include folder

    Library files:

    DirectX lib folder
    MS VC98 lib folder
    MS VC98 MFC lib folder



    Couple of things to note:


    1. Keith states on his site that the April 2005 SDK works with VS6; which is why I decided to try it for this legacy app which I still had using the October 2004 SDK. I've sent him email letting him know that it doesn't quite work without the tinkering indicated above.
    2. DirectShow is now in the MS Platform SDK. If you had modules which were based off any of its samples, you will have to modify them to work. e.g. this legacy app I was trying to build, was using an AVI player based on the original cutscene.cpp sample program included with DirectShow. Now that file has been moved into the /Microsoft Platform SDK/Samples/Multimedia/DirectShow/Players/Cutscene folder. It has been modified to work with later DX and MS PSDK builds, so your legacy app won't work without revision. e.g. you will get linker errors like lstrcpy_instead_use_StringCbCopy_or_StringCchCopy or wsprintf_instead_use_StringCbPrintf_or_StringCchPrintf etc because the older versions of some DirectShow samples, did stuff like:

      Code:

      wsprintf(szTitle, TEXT("%s: /0"), CUTSCENE_NAME);
       _vsntprintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);


      which have now been changed to:

      Code:

      (void)StringCchPrintf(szTitle, NUMELMS(szTitle), TEXT("%s: /0"), CUTSCENE_NAME);
      (void)StringCchVPrintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);


      You will have to revise your DirectShow sources to match the changes in the new samples in order to get them to work. Thats what I had to do with that one DirectShow sample (cutscene.cpp) that my player was based on.
    3. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
  • Start VS6 and go to Tools/Options/Directories. Make sure that the folder order is as indicated below. If any folder is not there, you need to add it. This is the order in which they need to appear.

    Include files:

    DirectX include folder
    MS Platform SDK include folder
    MS VC98 include folder
    MS VC98 MFC include folder
    MS VC98 ATL include folder

    Library files:

    DirectX lib folder
    MS VC98 lib folder
    MS VC98 MFC lib folder



    Couple of things to note:


    1. Keith states on his site that the April 2005 SDK works with VS6; which is why I decided to try it for this legacy app which I still had using the October 2004 SDK. I've sent him email letting him know that it doesn't quite work without the tinkering indicated above.
    2. DirectShow is now in the MS Platform SDK. If you had modules which were based off any of its samples, you will have to modify them to work. e.g. this legacy app I was trying to build, was using an AVI player based on the original cutscene.cpp sample program included with DirectShow. Now that file has been moved into the /Microsoft Platform SDK/Samples/Multimedia/DirectShow/Players/Cutscene folder. It has been modified to work with later DX and MS PSDK builds, so your legacy app won't work without revision. e.g. you will get linker errors like lstrcpy_instead_use_StringCbCopy_or_StringCchCopy or wsprintf_instead_use_StringCbPrintf_or_StringCchPrintf etc because the older versions of some DirectShow samples, did stuff like:

      Code:

      wsprintf(szTitle, TEXT("%s: /0"), CUTSCENE_NAME);
       _vsntprintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);


      which have now been changed to:

      Code:

      (void)StringCchPrintf(szTitle, NUMELMS(szTitle), TEXT("%s: /0"), CUTSCENE_NAME);
      (void)StringCchVPrintf(szBuffer, NUMCHARS - 1, szFormat, pArgs);


      You will have to revise your DirectShow sources to match the changes in the new samples in order to get them to work. Thats what I had to do with that one DirectShow sample (cutscene.cpp) that my player was based on.
    3. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
    4. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
    5. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.
    6. If you have been compiling a DX8.1 based source app with the DX9 SDK, they will no longer compile without further tinkering. e.g. the d3dx8.h file is gone. And no, replacing all calls to that header file with d3dx9.h won't work without further significant tinkering. You will have to port the app to DirectX9 SDK. Good luck with that if you didn't do it before. If someone knows a way around this and which I may not be aware of, please let me know.

这篇关于DirectX SDK April 2005 在旧版本的VC6中可能造成编译问题(转自http://7622.com/list/54782.htm)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/885418

相关文章

详谈redis跟数据库的数据同步问题

《详谈redis跟数据库的数据同步问题》文章讨论了在Redis和数据库数据一致性问题上的解决方案,主要比较了先更新Redis缓存再更新数据库和先更新数据库再更新Redis缓存两种方案,文章指出,删除R... 目录一、Redis 数据库数据一致性的解决方案1.1、更新Redis缓存、删除Redis缓存的区别二

oracle数据库索引失效的问题及解决

《oracle数据库索引失效的问题及解决》本文总结了在Oracle数据库中索引失效的一些常见场景,包括使用isnull、isnotnull、!=、、、函数处理、like前置%查询以及范围索引和等值索引... 目录oracle数据库索引失效问题场景环境索引失效情况及验证结论一结论二结论三结论四结论五总结ora

element-ui下拉输入框+resetFields无法回显的问题解决

《element-ui下拉输入框+resetFields无法回显的问题解决》本文主要介绍了在使用ElementUI的下拉输入框时,点击重置按钮后输入框无法回显数据的问题,具有一定的参考价值,感兴趣的... 目录描述原因问题重现解决方案方法一方法二总结描述第一次进入页面,不做任何操作,点击重置按钮,再进行下

解决mybatis-plus-boot-starter与mybatis-spring-boot-starter的错误问题

《解决mybatis-plus-boot-starter与mybatis-spring-boot-starter的错误问题》本文主要讲述了在使用MyBatis和MyBatis-Plus时遇到的绑定异常... 目录myBATis-plus-boot-starpythonter与mybatis-spring-b

Node.js 中 http 模块的深度剖析与实战应用小结

《Node.js中http模块的深度剖析与实战应用小结》本文详细介绍了Node.js中的http模块,从创建HTTP服务器、处理请求与响应,到获取请求参数,每个环节都通过代码示例进行解析,旨在帮... 目录Node.js 中 http 模块的深度剖析与实战应用一、引言二、创建 HTTP 服务器:基石搭建(一

Python如何实现 HTTP echo 服务器

《Python如何实现HTTPecho服务器》本文介绍了如何使用Python实现一个简单的HTTPecho服务器,该服务器支持GET和POST请求,并返回JSON格式的响应,GET请求返回请求路... 一个用来做测试的简单的 HTTP echo 服务器。from http.server import HT

mysql主从及遇到的问题解决

《mysql主从及遇到的问题解决》本文详细介绍了如何使用Docker配置MySQL主从复制,首先创建了两个文件夹并分别配置了`my.cnf`文件,通过执行脚本启动容器并配置好主从关系,文中还提到了一些... 目录mysql主从及遇到问题解决遇到的问题说明总结mysql主从及遇到问题解决1.基于mysql

如何测试计算机的内存是否存在问题? 判断电脑内存故障的多种方法

《如何测试计算机的内存是否存在问题?判断电脑内存故障的多种方法》内存是电脑中非常重要的组件之一,如果内存出现故障,可能会导致电脑出现各种问题,如蓝屏、死机、程序崩溃等,如何判断内存是否出现故障呢?下... 如果你的电脑是崩溃、冻结还是不稳定,那么它的内存可能有问题。要进行检查,你可以使用Windows 11

如何安装HWE内核? Ubuntu安装hwe内核解决硬件太新的问题

《如何安装HWE内核?Ubuntu安装hwe内核解决硬件太新的问题》今天的主角就是hwe内核(hardwareenablementkernel),一般安装的Ubuntu都是初始内核,不能很好地支... 对于追求系统稳定性,又想充分利用最新硬件特性的 Ubuntu 用户来说,HWEXBQgUbdlna(Har

MAVEN3.9.x中301问题及解决方法

《MAVEN3.9.x中301问题及解决方法》本文主要介绍了使用MAVEN3.9.x中301问题及解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面... 目录01、背景02、现象03、分析原因04、解决方案及验证05、结语本文主要是针对“构建加速”需求交