More Compile Problems

Author
HiddenMessenger
Max Output Level: -90 dBFS
  • Total Posts : 2
  • Joined: 2005/10/12 17:29:41
  • Status: offline
2005/10/12 17:47:43 (permalink)

More Compile Problems

Hi, I'm new here and i was hoping someone could help me with the following problem...

I'm trying to compile the sample plugins but get this error message:

--------------------Configuration: AutoClip - Win32 Debug--------------------
Compiling...
StdAfx.cpp
e:\program files\microsoft platform sdk\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
e:\program files\microsoft platform sdk\include\winnt.h(222) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

AllSamples - 2 error(s), 0 warning(s)


I'm using Visual C++ 6.0, DXi2, the latest Platform SDK, and Direct X 9.0 SDK. I followed kingjahrome's tips and they got rid of a few different errors, but these have been replaced by this new one, which i can't figure out.

From browsing other forums it seems that this is a common problem related to a missing semicolon in a file which is included prior to winnt.h, but I really can't work out how to go about fixing it.

Has anyone else had this problem? Sorry if its quite basic but I'm new to all this, and I just want to get the samples compiling and go from there!

Oh yeah, on another forum someone suggested downgrading to an earlier PSDK, from 2003, but I thought i'd ask before i did that, cos it's quite a big file

Cheers

Matt
#1

3 Replies Related Threads

    HiddenMessenger
    Max Output Level: -90 dBFS
    • Total Posts : 2
    • Joined: 2005/10/12 17:29:41
    • Status: offline
    RE: More Compile Problems 2005/10/13 15:07:28 (permalink)
    Just to say, I installed directx 8.0 sdk instead of 9, but still have the same problem
    any help appreciated!
    matt
    #2
    kingjahrome
    Max Output Level: -84 dBFS
    • Total Posts : 338
    • Joined: 2004/07/16 01:35:31
    • Status: offline
    RE: More Compile Problems 2005/10/14 17:09:20 (permalink)
    That warning about "missing ;" usually means that a particular data type, perhaps PVOID64 or a data type listed in one of the lines prior to that line, isn't defined.

    The typical way to fix it is to #include the header file that defines the data type in the file that won't compile, or in stdafx.h

    The project should already be including the file so....

    There is the possibility that there are duplicates of certain include files. For instance a header file could exist in the platform sdk and has the same name as a header file that was installed with VC++ 6. One file might define the data type but the other doesn't. In that case, you have to make sure that your include paths are setup in order of which folder you want to look in first. Platform SDK should probably be the one that occurs first since it is more up to date than Visual C++6. The compiler will pick the first file that matches the name and use it so that's why the order is important.

    Just do a search in you include folders for PVOID64, or like I said, it could even be a data struct on one of the lines prior to that one that is undefined.

    You'll be looking for something like "typedef blahblah PVOID64;"


    I can also look to see what version of PSDK I got to build. At the time I was using the latest but there may be something newer out by now. I kind of doubt that's the issue but you never know.
    post edited by kingjahrome - 2005/10/14 17:20:46
    #3
    kingjahrome
    Max Output Level: -84 dBFS
    • Total Posts : 338
    • Joined: 2004/07/16 01:35:31
    • Status: offline
    RE: More Compile Problems 2005/10/15 01:55:23 (permalink)
    Here's an update with the versions of SDK's to use:

    Cakewalk’s DXi2 SDK will compile with DirectX 9. These steps apply if you're trying to compile "AllSamples.dsw" projects in the DXi2 Development kit.

    1. Get your compiler and libraries set up.

    Required versions of DirectX 9 and Platform SDK:
    Microsoft Direct X 9 SDK Summer 2003 http://www.microsoft.com/downloads/details.aspx?FamilyID=9216652f-51e0-402e-b7b5-feb68d00f298&displaylang=en
    This can still be downloaded and is straightforward to get working with the Dxi2 SDK. Haven’t had any luck with the latest version.

    Platform SDK Febraury 2003 is the version I used to get it working but now you have to order legacy PSDK CD’s from Microsoft. It’s possible to download the latest version to see if will work. http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
    There are several unsupported functions in DX9 that didn't come with Visual C++ 6.0 default libraries and the platform SDK includes them.

    Compiler:
    Visual C++ 6.0 with SP6

    2. Once you have the latest platform SDK installed, you have to set it up in Visual C++ as the preferred library to use. Visual C++ files are NOT overwritten when it gets installed, the platform SDK has it’s own folder and you have to make Visual C++ aware of it. This means going in to Options/Directories and setting these to appear FIRST in each list.

    Executable Files: “E:\Program Files\Microsoft SDK\Bin”
    Include Files: “E:\Program Files\Microsoft SDK\Include”
    Library Files: “E:\Program Files\Microsoft SDK\Lib”
    Source Files: “E:\Program Files\Microsoft SDK\src\mfc”

    3. After Direct X 9.0 SDK is installed go in to Options/Directories and set these to appear following Microsoft SDK entries in each list.

    Executable Files:
    Include Files: “E:\Program Files\DX90SDK\Include”
    “E:\Program Files\DX90SDK\Samples\C++\DirectShow\BaseClasses”
    Library Files:”E:\Program Files\DX90SDK\Lib”
    Source Files:

    4. Download and install DXi2 Development Kit.
    http://www.directxfiles.com/devxchange/dxi/default.asp

    5. Set “MSSDK” Environment Variable:

    In Control Panel, you have to go to System/Advanced/Environment Variables and set the System Variable "MSSDK" (don’t include the quotes) to the location you have DirectX 9 installed. This path cannot have space characters (e.g. "E:\Program Files\DX90SDK") or the linker will fail. The linker warning will be something obscure about not being able to find “program.obj.” That’s because the space in “Program Files” gets interpreted by the linker as “program.obj” The workaround is to use the 8 character version of the path such as "E:\Progra~1\DX90SDK”

    MSSDK is a variable used in Visual C++ under Project Settings/C C++/Project Options in the “AllSamples.dsw” projects: /I "$(MSSDK)\include" /I "$(MSSDK)\Samples\Multimedia\DirectShow\BaseClasses"

    You will have to restart Visual studio to make it take effect.

    6. Version number check will fail in one of the files…
    #if (VERSION_RES_MAJOR_VER != 8)
    #error DirectX 8 SDK is required to build this project.

    Just change it to
    #if (VERSION_RES_MAJOR_VER < 8)
    #error DirectX 8 or higher SDK is required to build this project.

    7. Now it should compile and link and you ought to be able to hear the plugins play in Sonar.
    #4
    Jump to:
    © 2024 APG vNext Commercial Version 5.1