What's new

Having a Problem Compiling DirectX and other Apps

Xtreme2damax

New member
Hi, I'm posting this because I'm trying to set up the DirectX SDK with Microsoft Visual C++ 2005 Express Edition and am having a problem getting applications to compile.

I've tried Compiling official Source Code of Open Source Projects, as well as some I attempted on my own, Almost all of them fail with multiple errors, but no one else has had a problem compiling these applications with the same Compiler/IDE that I'm using.

Even simple DirectX Apps such as Nehe3d Simple Basecode errors out on compile, however it does compile fine in Codeblocks IDE with mingw and Dev-C++ and other compilers, I'm just having problems getting the sourcecode to compile under Visual C++ 2005 Express Edition.

I need to stick to a free Ide and compiler, because I cannot afford to buy full featured ones such as Visual Studio at the moment. Besides some emulators such as PCSX2 and others are Porgrammed in Visual Studio or Visual C++, and will only compile under those Ide's/Compilers.

I'm attaching the buildlog.html file in a .7z compressed format to my post, so someone who has experienced a similar problem and solved it, or someone who is more experienced than me in this paticular area may be able to help:

Thank You if anyone can help me solve this problem:bouncy:
 
OP
X

Xtreme2damax

New member
I was able to compile one application fine, it was a number guessing game I modified and compiled off of Sourcecode that was posted on gamedev.net.

Is the Platform SDK actually required to compile applications? I checked the Microsoft website and the download for the Psdk is a whopping 300 - 400 Megabytes, far too big to download being on slow dial-up.

I have no way to have any friends download it and burn it for me, as I'm no longer in contact with any of my friends nor have I seen them in a while. I also don't have any internet cafes in my area within a reasonable distance. So basically my only two options to get the Psdk are void.

Is there a way to significantly reduce the download size to be reasonable to download on dial-up, or is there a way to only download the components/libraries necessary for compiling applications?

Thanks if anyone can let me know ;)
 

Garstyciuks

New member
Platform SDK is required for programming windows. I believe that to compile DirectX applications you need to have it installed.
 

Doomulation

?????????????????????????
Some things have an install that downloads the required files, but the platform SDK is very big and many applications are compiled against it, unfortunaly. You need the SDK for the express editions to compile Windows apps. It is also recommended to download if you have other IDEs and compilers.
 
OP
X

Xtreme2damax

New member
Going to attempt to Download the PSDK, need to know a few things.

I Guess I'll try to download the ISO of the Platform SDK. Does anyone know if the Windows Server 2003 R2 Platform SDK will work on 32-bit Windows XP?

It does say that Windows XP is a Supported Platform, but I'm not sure if the Windows Server 2003 Psdk Supports 32-bit Windows Xp, or if supports 64-bit or if it Supports both 32-bit and 64-bit Windows XP.

Thanks if someone could let me know:bouncy:
 
OP
X

Xtreme2damax

New member
Still in need of help

Ok I am posting again because I went through the slow, grueling and painstaking process of downloading the Windows Server 2003 R2 Platform SDK ISO from the Microsoft website on my 56k Dial-Up internet.

Now that I have Installed it, alongside the DirectX SDK and set it up By going to: Tools->Options->Projects and Solutions->Visual C++ Directories-> "Show Directories For", and setting it to use the Include and Library Directories from both the Platform SDK and the The DirectX SDK, I am afraid to say, that I am still having problems Compiling Apps and DirectX Apps.

I thought by Downloading/Installing the PSDK my problems would be solved, but instead they still remain. I still get errors upon errors when attempting to compile official sourcecode from any opensource project.

I desperately need to get this working properly, because I plan to attempt DirectX Coding, and delving into game development. All of that I can not do if I can't get these simple things set up in order to be able to code and compile applications successfully.

Just in case anyone forgot or doesn't read my post above, I am using Microsoft Visual C++ and C# 2005 Express editions.

I would appreciate every bit of help I can get, and would be very thankful if someone could help me.

Thank You :)
 
Last edited:

Doomulation

?????????????????????????
The second problem with Microsoft's compilers are that they are not very standard compliant. This means that, unfortunately, Visual Studio has some problems compiling projects and code that was developed within another IDE.
To make sure, it would be a good idea to post some of the compile errors. And if it truly works under another IDE, then I do suggest you use those to compile the projects. Note that there is nothing wrong with using Visual Studio to create and compile applications, but beware not to use any Microsoft extensions to get it compiling under other compilers.
 
OP
X

Xtreme2damax

New member
Here Is the Buildlog in html format of the project I was trying to compile. This not only happens with this project or sourcecode, but with others as well:

I'm also attaching the project that I'm trying to compile:

Note that this project has a Visual C++ Project file, so I'm guessing that it should work with Visual C++ 2005 Express Edition.

Thank you if you or anyone can help me solve this problem.
 
F

fbff

Guest
hey, its christmas so i thought i'd help you out.

i did a quick google search for "macwin32.h" and came across this link.. follow the help on the last reply of that thread.

Using VC++ 2005 Express with the Platform SDK

next, you'll have to fix the errors in dsutil.cpp and cidade.cpp.. the first two errors are pretty easy to fix. the other one may be a bit more difficult. it seems to me that this sample you have found is for an old version of visual studio (version 6) and microsoft have made a few changes to the compiler so it might not compile so cleanly anymore in the express version (which is a lite version of v8)

let me know if you need more help.
 
OP
X

Xtreme2damax

New member
Thank You for your help.

I am unsure as to what errors there are in those two files. Perhaps you might be able to point them out and suggest what they should be. I am just beginning in programming, and I mostly want to learn DirectX programming to get into game deving in the future. It's basically a learn as I go along process. I just started reading some tutorials on c++, and I will hopefully be re-attending college next year to resume my studies in programming.

My main worry right now is to douse myself in tutorials, books and anything else so I can learn programming As well as setting up the SDKs properly so I can compile applications successfully.

I will first start on simple applications and then work my way up from there. I need you to let me know those errors and how to correct them, so I'll be able to work my way up from there.

I hope this doesn't sound n00bish what I'm saying, and I hope it's not too much trouble for you to help. I would really appreciate it if you may be able to help me solve this problem.

Thank You:)
 

Doomulation

?????????????????????????
From your log, I see the following:

- Undeclared indeitfier 'i': This is probably someone with bad programming habits. The letter 'i' is usually used as a counter variable and declared within a foor loop. The standard says that a var defined in the for loop is only visible in the for scope and not outside, though many programmers tend to ignore that. There are two solutions to this: Move the declaration of i outside the loop or change the setting 'Force conformance in for loop scope' to No (not recommended).
- Undeclared identifier 'LPDIRECTXFILEDATA': Usually, for DX projects, you would like the DirectX SDK. Anyhow, I know that Microsoft is screwing up its SDK releases by removing headers, code and changing names. Therefore, code compiled with older versions may break when compiled with newer versions.
- Another thing to note is that the SDK paths should be on the top of the list for includes and libraries to avoid conflicts with older headers which define the same things.

I also found that apparently the name LPDIRECTXFILEDATA was renamed to LPD3DXFILEDATA. You can use a define to help you out there by typing
Code:
#define LPDIRECTXFILEDATA LPD3DXFILEDATA
I don't know if it works, however.
 

Top