Jump to content
  • Advertisement

Archived

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

vw1

new to directx - PLEASE HELP!!!

This topic is 6667 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

Hi, I cannot get any directx progs to compile. I think that I have done all of the pre-req''s that are necessary (using MSVC 6.0) I even tried the first program in "Tricks of the Game Programming Gurus" (Pong clone). Got it to compile, but when I tried to run it, my screen blanked to a black screen, and then back to to ide. Another program that wouldn''t compile kept giving me the error: Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/Chapter4.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. I have three different books on directx programming, and can''t get any of the supplied source code to compile. Any help would be greatly appreciated. Note: I already changed the directory setting for lib and include to point to my directx sdk installation location, and those settings are first in the list.

Share this post


Link to post
Share on other sites
Advertisement
If you got one program using direct x to compile, then your lib and include directories are correct. The other programs probably require you to add a separate library file to your project.

I would build and modify the one that compiles until it works.

Share this post


Link to post
Share on other sites
The Direct X include files have corponding libraries, these libraries have necessary external definitions you need. for example: the ddraw.h file has a ddraw.lib which the linker must use durring compile time. To include these libraries, you can either go to your compile options, and were it asks for library file names enter it there; or you can type:

#pragma comment(lib, "ddraw.lib")

to include this in your source code. There is another lib that isn''t associated with an include file that you will need also it is:

#pragma comment(lib, "dxguid.lib")

You will either need to copy these libraries to your development LIB directory or place the path of your DirectX SDK--LIB files in the pragma statement.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!