Microsoft Visual C++ 6.0 help

Started by
5 comments, last by thebigzzz 19 years, 3 months ago
This is a very noobist question, bear with me please :) I'm used to making simple projects with Microsoft Visual C++ 6.0. Like DOS applications/games. So after reading 2 books on C programming (and mastered it :D) and a giant book on C++ programming (and mastered it :P), I thought I was ready to move on to books relating to game programming in specific. Before I bought my books about the languages, I bought a book about it. Which I found through this page (thanks alot :)). At the time I didn't get any of the stuff in it. It's called Windows game programming for dummies. I've been through it and understand it perfectly fine now, but here comes my problems: I don't know how to make the exampels work probaly, when make a win32-application in microsoft visual c++ 6.0, and add the .cpp files Andre Lamothe made. Then I try to add the DirectX .lib files and .h files. Then hit build/compile. And I get errors, unexpected end of file and unreconized structures and some more. While I'm pulling my hair, and throwing bottles. Can anybody help me solving this problem, so I can compile these exampels. I got this program really cheap from an add in the paper, but the manual is missing (but it isn't a illegal copy though) While I'm at it, is there any way of getting line number on it? it would really help removing errors :P
Advertisement
If you are using directx 9, d3dx9.lib wont work with msvc++ 6 (possibly where your error is?) You can download the patch on the microsoft directx site. Or, here is a direct link. It is the October 2004 Extras upgrade.


If you can show us the output, we can probably help more.
I apoligise if this is not helpful as you are already doing this, but as I don't know if you have done it before I will post it anyway.

What you want to be doing is setting up the additional include path and additional libary path to include the relevent directories from where you have the directx SDK installed. Look in the properties of the project for this these fields.

Hope this helps.

Dragoncar
well, I basically only know how to press build/compile and debug (was in one of my books) otherwise everything is totally new to me. I tried installing that patch, it didn't do any good, I started with having directx 8.1 SDK installed (came with the cd in the book). Didn't work. I installed a directx 9.0 SDK. Didn't help. I think I'm including these .lib files wrong. I just press "add files" and grab the files andré wrote should be included.

I think the most helpfull thing would be a step-by-step thing on how to add these .lib files and maybe the directx .h files as well, but I don't think the .h files is the problem though. I would upload the source files, but I don't own any webspace...

anonymous poster, I don't know how to do that, I looked around abit, but no luck :P

thanks for posting guys :)
1. Goto Options->Directories
2. Change the Show Directories For: to Include Files
3. Add a new directory (which is "Location of Directx SDK"\INCLUDE)
4. Select the new entry and move it to the top
5. Change the Show Directories For: to Library Files
6. Add a new directory (which is "Location of Directx SDK"\LIB)
7. Move this new entry to the top
8. Click OK
9. Goto Project->Settings
10. Select the tab called Link
11. Set the category drop down box to General
12. To the end of the Object/library modules add the .lib files that the book says
13. Click OK

Note where I put the "Location of Directx SDK" I do mean to put the actual location of the sdk eg. C:\DXSDK

Dragoncar
Try adding this to your main source file includes list:

#pragma comment(linker, "/subsystem:windows") // now the bastard will link!

That's what I had to do to get things to compile from Andre's Tricks Game Programing Gurus book. Hope that helps!

@dragoncar: That's it :) thanks alot :D I just get like a hundred "warning C4244: '=' : conversion from 'float' to 'long', possible loss of data" warnings now, but at least the compiler is working fine now :) The warnings are probaly just the code complaining a bit. All I know is I can compile :D

After messing around with some of the sampels in the bok, I guess I have to move on to making some gui stuff and then 3d/ai/design.

This topic is closed to new replies.

Advertisement