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

相关文章

mybatis和mybatis-plus设置值为null不起作用问题及解决

《mybatis和mybatis-plus设置值为null不起作用问题及解决》Mybatis-Plus的FieldStrategy主要用于控制新增、更新和查询时对空值的处理策略,通过配置不同的策略类型... 目录MyBATis-plusFieldStrategy作用FieldStrategy类型每种策略的作

linux下多个硬盘划分到同一挂载点问题

《linux下多个硬盘划分到同一挂载点问题》在Linux系统中,将多个硬盘划分到同一挂载点需要通过逻辑卷管理(LVM)来实现,首先,需要将物理存储设备(如硬盘分区)创建为物理卷,然后,将这些物理卷组成... 目录linux下多个硬盘划分到同一挂载点需要明确的几个概念硬盘插上默认的是非lvm总结Linux下多

Python Jupyter Notebook导包报错问题及解决

《PythonJupyterNotebook导包报错问题及解决》在conda环境中安装包后,JupyterNotebook导入时出现ImportError,可能是由于包版本不对应或版本太高,解决方... 目录问题解决方法重新安装Jupyter NoteBook 更改Kernel总结问题在conda上安装了

pip install jupyterlab失败的原因问题及探索

《pipinstalljupyterlab失败的原因问题及探索》在学习Yolo模型时,尝试安装JupyterLab但遇到错误,错误提示缺少Rust和Cargo编译环境,因为pywinpty包需要它... 目录背景问题解决方案总结背景最近在学习Yolo模型,然后其中要下载jupyter(有点LSVmu像一个

如何通过海康威视设备网络SDK进行Java二次开发摄像头车牌识别详解

《如何通过海康威视设备网络SDK进行Java二次开发摄像头车牌识别详解》:本文主要介绍如何通过海康威视设备网络SDK进行Java二次开发摄像头车牌识别的相关资料,描述了如何使用海康威视设备网络SD... 目录前言开发流程问题和解决方案dll库加载不到的问题老旧版本sdk不兼容的问题关键实现流程总结前言作为

解决jupyterLab打开后出现Config option `template_path`not recognized by `ExporterCollapsibleHeadings`问题

《解决jupyterLab打开后出现Configoption`template_path`notrecognizedby`ExporterCollapsibleHeadings`问题》在Ju... 目录jupyterLab打开后出现“templandroidate_path”相关问题这是 tensorflo

如何解决Pycharm编辑内容时有光标的问题

《如何解决Pycharm编辑内容时有光标的问题》文章介绍了如何在PyCharm中配置VimEmulator插件,包括检查插件是否已安装、下载插件以及安装IdeaVim插件的步骤... 目录Pycharm编辑内容时有光标1.如果Vim Emulator前面有对勾2.www.chinasem.cn如果tools工

最长公共子序列问题的深度分析与Java实现方式

《最长公共子序列问题的深度分析与Java实现方式》本文详细介绍了最长公共子序列(LCS)问题,包括其概念、暴力解法、动态规划解法,并提供了Java代码实现,暴力解法虽然简单,但在大数据处理中效率较低,... 目录最长公共子序列问题概述问题理解与示例分析暴力解法思路与示例代码动态规划解法DP 表的构建与意义动

Java多线程父线程向子线程传值问题及解决

《Java多线程父线程向子线程传值问题及解决》文章总结了5种解决父子之间数据传递困扰的解决方案,包括ThreadLocal+TaskDecorator、UserUtils、CustomTaskDeco... 目录1 背景2 ThreadLocal+TaskDecorator3 RequestContextH

关于Spring @Bean 相同加载顺序不同结果不同的问题记录

《关于Spring@Bean相同加载顺序不同结果不同的问题记录》本文主要探讨了在Spring5.1.3.RELEASE版本下,当有两个全注解类定义相同类型的Bean时,由于加载顺序不同,最终生成的... 目录问题说明测试输出1测试输出2@Bean注解的BeanDefiChina编程nition加入时机总结问题说明