VSL 2010のコンパイルの時はwint.h問題に出会います。
28207 ワード
http://hagejid.blog.51cto.com/141754/294797
今日は思いつきで、マイクロソフトでVSL 2010に遊びに行きました。組み立てたら勝手に工事をして、結果をコンパイルする時にいくつかのエラーが出てきます。全部wint.hの中にあります。
初めて使い慣れないものを使って、「winint.h」というキーワードで探しましたが、VSS 2005にDX SDKを設置したのがネットで見つけました。
今日は思いつきで、マイクロソフトでVSL 2010に遊びに行きました。組み立てたら勝手に工事をして、結果をコンパイルする時にいくつかのエラーが出てきます。全部wint.hの中にあります。
- ------ Rebuild All started: Project: 123, Configuration: Debug Win32 ------
- stdafx.cpp
- c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(290): error C2146: syntax error : missing ';' before identifier 'PVOID64'
- c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(290): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(8992): error C2146: syntax error : missing ';' before identifier 'Buffer'
- c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(8992): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(8992): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
それからまた大法を捜索して、これらの情報で捜索して、誰を探してこの問題にぶつかります。その結果、マイクロソフトのウェブサイトで情報を見ました。
- I built a new project to start the porting of an application written with CV6++, but the project stopped with the following errore just after few modifications to stdafx.h and the main include icarus2010.h.
-
-
-
- 1>------ Build started: Project: Icarus2010, Configuration: Debug Win32 ------
- 1>Build started 04/11/2009 16.51.46.
- 1>_PrepareForBuild:
- 1> Touching "Debug\Icarus2010.unsuccessfulbuild".
- 1>ClCompile:
- 1> stdafx.cpp
- 1>c:\programmi\microsoft sdks\windows\v7.0a\include\winnt.h(290): error C2146: syntax error : missing ';' before identifier 'PVOID64'
- 1>c:\programmi\microsoft sdks\windows\v7.0a\include\winnt.h(290): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- 1>c:\programmi\microsoft sdks\windows\v7.0a\include\winnt.h(8992): error C2146: syntax error : missing ';' before identifier 'Buffer'
- 1>c:\programmi\microsoft sdks\windows\v7.0a\include\winnt.h(8992): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- 1>c:\programmi\microsoft sdks\windows\v7.0a\include\winnt.h(8992): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- 1>c:\programmi\microsoft sdks\windows\v7.0a\include\exdisp.h(842): error C2061: syntax error : identifier 'SHANDLE_PTR'
- 1>
- 1>Build FAILED.
- 1>
- 1>Time Elapsed 00:00:01.93
- ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
-
- The modifications in the stdafx were
-
- #pragma warning(disable: 4786)
- #pragma warning (disable:4996)
- #pragma warning (disable:4244)
- #pragma warning (disable:4189)
- #pragma warning (disable:4100)
-
- and the modifications in the main inlcude were some include files from the VC6++ application. For a while the new project worked!
- ( ) Product Language
- EnglishVersion
- Visual Studio 2010 Beta 2Operating System
- Windows XP
- Operating System Language
-
- ItalianSteps to Reproduce
- unknownActual Results
- unknownExpected Results
- soon You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]
-
-
- ///////////////////////////////////////////////////////////////////////
-
- Microsoft 2009/11/5 1:29
- Thank you for your feedback, We are currently reviewing the issue you have submitted.
- Microsoft 2009/11/8 20:41
- Thanks for reporting this issue.
-
- In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.
-
- Please provide us with a demo zipped project file so that we can conduct further research.
-
- It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue.
-
- Thanks again for your efforts and we look forward to hearing from you.
-
- Visual Studio Product Team
-
- Microsoft 2009/11/9 11:54
- Hi -
-
- Do you have the DirectX SDK installed on the machine? We have seen some cases where the DirectX SDK installer modifies the Visual Studio include path and puts the DirectX SDK entries first. This causes the build to use DirectX versions of some files that are a different version that the files in the Visual Studio SDK.
-
- Try changing the order of include directories in VS so the DirectX SDK entries are last. That may solve the problem.
-
- Mike Robinson
- Program Manager
- Windows SDK Team
ある家伙もこの問題にぶつかりました。マイクロソフトの答えは、DIRECTX SDKをインストールしたかもしれません。ディレクトリ設定を含めてDX SDKのディレクトリを後ろに移動すればいいです。初めて使い慣れないものを使って、「winint.h」というキーワードで探しましたが、VSS 2005にDX SDKを設置したのがネットで見つけました。
- : winnt.h
-
- #define POINTER_64 __ptr64
-
- typedef void *PVOID;
- typedef void * POINTER_64 PVOID64;
-
- winnt.h.
- include ,platform SDK winnt.h
- DDK ,vc6.0 winnt.h 。 dxsdk winnt.h 。
-
- IDE -> -> vc++ ; include
- dxsdk winnt.h 。
-
- DirectShow VS2005
- :
- XP Professional sp2
- visual studio 2005 version 8.0.50727.42
- DirectX 9.0(9.0b) SDK Update - (Summer 2003)
-
-
- , baseclasses, baseclasses? dx sdk , :
- D:\DX90SDK\Samples\C++\DirectShow\
- baseclasses , , 。
-
- 1, baseclasses.sln , , ,
- :
- 1>D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
- 1>D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- 1>D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(5940) : error C2146: syntax error : missing ';' before identifier 'Buffer'
- 1>D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- 1>D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h(5940) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- 1>d:\DX90SDK\Samples\C++\DirectShow\BaseClasses\ctlutil.h(278) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int : :operator=(LONG); , VC6 , , ; vs2005 , , wd4430 ; c+ +/Command Line /wd4430 。
-
-
- 2, Tools->Options->Projects and solutions->vc++ directories->show directories for include files
-
- D:\DX90SDK\Include
- D:\DX90SDK\Samples\C++\DirectShow\BaseClasses
- D:\DX90SDK\Samples\C++\Common
- , include files , , :
- $(VCInstallDir)include
- $(VCInstallDir)atlmfc\include
- $(VCInstallDir)PlatformSDK\include
- $(FrameworkSDKDir)include
- D:\DX90SDK\Include
- D:\DX90SDK\Samples\C++\DirectShow\BaseClasses
- D:\DX90SDK\Samples\C++\Common
- project->BaseClasses properties->configuration->C/C++ -> General->Additional Include Directories (.,..\..\..\..\include) , ,PVOID64 , :
- POINTER_64 , 64 , SDK BASETSD.H (Microsoft Visual Studio 8\VC\PlatformSDK\Include\basetsd.h(23):#define POINTER_64 __ptr64), DXSDK basetsd.h, POINTER_64, , include files 。 , winnt.h , :typedef void *PVOID;
- typedef void *POINTER_64 PVOID64;
- :
- #define POINTER_64 __ptr64
-
- 3, , :
- BaseClasses\ctlutil.h(278) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
- , :
- project->BaseClasses properties->configuration->C/C++ ->Command Line, /wd4430 。
- 4, , error C2065: 'Count' : undeclared identifier , ,C++ , for for , for for(int i,...), for i , , project->BaseClasses properties->configuration->C/C++->Language->Force Comformance in For Loop Scrope No 。 , , 。
-
- , , , , 4 :
- BaseClasses\Debug\strmbasd.lib
- BaseClasses\Debug_Unicode\strmbasd.lib
- BaseClasses\Release\STRMBASE.lib
- BaseClasses\Release_UnicodeSTRMBASE.lib
-
- lib
-
- commctrl.lib
- coredll.lib
- strmiids.lib
- strmbase.lib
- uuid.lib
- ole32.lib
- commdlg.lib
-
- Tools->Options->Projects and solutions->vc++ directories->show directories for->library files 。
- DX90SDK\Samples\C++\DirectShow\Players\PlayDMO 。
-
-
- 3 blog, :
- DirectShow VS2005 PVOID64
- http://www.cnblogs.com/RunOnTheWay/archive/2008/01/17/1043705.html
- DirectShow VS2005
- http://blog.cnii.com.cn/?uid-75821-action-viewspace-itemid-24418
- Some DirectShow Samples Break in Visual Studio 2005
- http://blogs.msdn.com/mikewasson/archive/2005/05/23/some-directshow-samples-break-in-visual-studio-2005.aspx