Archived

This topic is now archived and is closed to further replies.

Jimmyp4ge

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

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yes, yes... I can see how that might be a problem...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites