Jump to content
  • Advertisement
Sign in to follow this  
bwskill

some help :)

This topic is 5133 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok guys here's the deal I recently got "TRicks of the windows game programming gurus" by Andre LaMothe im having trouble building the freakout game from the sources included on the CD: -using vc++ introductory edition thats included with the book -installed the directx 6.1 sdk problem is i really have no ideea on how to include the library files from the sdk, i understand that they are in the lib directory im looking for someone to tell me step by step if you can like go to project/settings/link etc how to include those libraries I assume thats why I cant build the project yet getting "c:\documents and settings\temp\desktop\c\source\t3dchap01\blackbox.h(34) : error C2146: syntax error : missing ';' before identifier 'lpdd' " code line is extern LPDIRECTDRAW4 lpdd; what i did so far :D new project/win32 aplication/gave it a name/empty project and added the 3 source files from the aplication I tried various methods of adding those libraries files to my project however I have failed 8( Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Assuming you are using VC++ 6.0, you would go to tools->options, find the directories tab across the top, and then setup the paths to the directx includes folders and lib folders. They should be somewhere like C:\DXSDK\include and C:\DXSDK\lib, respectively. Not sure exactly where they will be for you. Just add the folders to the tops of their lists.

To actually include the libraries, you would go Project->settings, and find the 'link' tab. Where it says 'Object/Library modules:' You would add to the front of the list the libraries you want to include.

That said, why are you learning to use the DX6 sdk, and directDraw 4??? That is extremly outdated. Currently, dx9.0c is the newest version, and directDraw has been completly removed in favour of using directGraphics (essentially, using d3d for both 2 and 3d work now). If you have a reason to want to use that then go ahead, but if you are learning fresh (as I suspect you are), you might do better to start up to date. Otherwise, it would be like learning windows 3.1, and then finding out that you need to now learn a completly different system...windows xp.

Share this post


Link to post
Share on other sites
well all I can say is that is very frustrating ><
yes I did all of that before and did it again after your reply with no succes.
yes i am using vc++ 6.0

as to why im using directx 6.1, its because im trying to follow this book atm I am not going to learn by heart all the directx calls either at this stage. All I want is to compile this so I can play around with it :D - im not into directx just yet
all the program does with direcx is the initialization of the surface and drawing some rectangles anyway with the Draw_rectangle function from ddraw.lib

anyway ><

Share this post


Link to post
Share on other sites
I am not sure what you are doing wrong. As a test, I made a basic test case to work with:
#include <iostream>
#include "ddraw.h"
int main()
{
LPDIRECTDRAW4 lpdd4;
std::cout << &lpdd4 << std::endl;
return 0;
}

All it does it output the memory location of the object, if one is created at all. My lib selection looks like
ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
, the standard ones plus ddraw.lib.

Quick question. For the paths to your libraries, are the directx ones on the top? This is necessary. Also, in the include directory, it must be able to find ddraw.h. As a quick test, go to where it says #include "ddraw.h" in your code, right click on it, and hit open document. It must be able to find that file, or nothing else will work.

If this doesn't work, send me your project. ericburnett@gmail.com . I will see what happens on mine.

Share this post


Link to post
Share on other sites
f:\mssdk\include f:\mssdk\lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/test999.pdb" /debug /machine:I386 /out:"Debug/test999.exe" /pdbtype:sept

I put the paths to libraries in object/libraries modules as seen above, I hope I am not wrong
it can find ddraw.h on rclick

result is:
f:\vcc\msdev98\myprojects\test999\test999.cpp(5) : error C2065: 'LPDIRECTDRAW4' : undeclared identifier

and I sent you the project
thanks again for the help

Share this post


Link to post
Share on other sites
after some emails back and forth the painfull truth has come out

i did not know there was a tools/options

consider this thread closed

major props to eric for his patience

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!