How can i learn from the samples if they wont compile?

Started by
7 comments, last by Jimmyp4ge 22 years, 4 months ago
I am using Dx8 sdk and i''m pretty sure i have all the directories setup correctly in vc++6. It will build but i can never get any of the samples to compile... I''ll always get something like this (for direct3d) samples: Debug/trial2.exe : fatal error LNK1120: 18 unresolved externals or on other (directdraw) samples: error C2143: syntax error : missing '';'' before ''*'' error C2501: ''CDisplay'' : missing storage-class or type specifiers ^^There will usually be about 200+ of those^^ I''d really like to get these working so i can disect them and learn to do it myself... i have books but its like a different world from reading to actually "seeing" it... TIA, Jimmyp4ge
Advertisement
Go Project Menu->Settings
Go to the link tab, and where it has all the *.lib files add a few entires:
d3d8.lib
d3dx8.lib
d3dxerr.lib

Those are the most useful ones...there is one for every header. Look in the {SDK install spot}\Bin\Lib for more files.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Yes, yes... I can see how that might be a problem...
Ok I added every .lib from the dx8 sdk in there... and still no luck.... same errors still... what the heck can be the case???
What do you mean by pretty sure all the directories are included. Make sure that not just the include/ directory is included in the linker but also the lib/ directory is there. Then move them to the top of the list so VC++ 6.0 checks these files first.
Yeah, thats how i got it.. the SDK did pretty much all of the work when i installed it. But the Includes and Libs are all setup under the Tools>Options... > Directories tab...

It just sucks... ''tryin'' to learn here when the offered material won''t even work!! It really makes you wish there was still a big console following...
umm, last i checked (since i use the smaples quite frequently for learnign some of the spiffy dx stuff). you dont need to modify the project workspace of ANY sample. they are setup to work just by opening the project workspace. all the required libs are included in the workspace already. i am guess you are copying the code over and trying to compile. that dont work unless you know what you are doing.

are you sure you did not screw up the project workspaces? since i never had any problems compiling any of the samples in the sdk or from msdn (dx and non dx)
You need to go to Tools->Options->Directories and add the include and library paths, make sure they are the FIRST ones in the list or it will default to the old DxSDK that came with VC++.

--------------------------

Those who dance are considered insane by those who cannot hear the music.
Those who dance are considered insane by those who cannot hear the music.
I also notice that when I try to open a New project it dosent have a Directx Project on the list like the documentation states... did i install the sdk wrong??? It was pretty automatic and i didnt see very many options on HOW to install during setup....

This topic is closed to new replies.

Advertisement