new to directx - PLEASE HELP!!!
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.
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.
I would build and modify the one that compiles until it works.
___________________________Freeware development:ruinedsoft.com
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.
#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.
When you create your project you need to choose ''Win32 Application'', not ''Win32 Console Application''
- WitchLord
- WitchLord
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement