Thread: I am Having trouble Compiling with DirectX

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    4

    I am Having trouble Compiling with DirectX

    I am learning the basics here. I am trying to blt a bitmap to the screen. But the problem I am having is not the code. The code compiles, but when I try to link the code during compile I get this error...

    ---------Configuration: techs revenge - Win32 Debug-------------
    Linking...
    TechRevengine.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7
    Debug/techs revenge.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    techs revenge.exe - 2 error(s), 0 warning(s)


    Any insight on how to ratify the situation woulb be great.

    I am using Visual C++ Introductory Edition version 6.0

    Thanks

  2. #2
    Registered User Coder's Avatar
    Join Date
    Aug 2001
    Location
    Cairo, Egypt
    Posts
    128
    Did you add ddraw.lib ( or ddraw7.lib, I don't recall which is the name ) to your libraries?

    Goto Project Menu->Settings Select your project, click the "Link" tab, and add "ddraw.lib" to the list of libraries available.

    Alternatively ( I prefer this ), you can add this line of code to your header files that use ddraw :
    Code:
    #pragma comment(lib,"ddraw.lib")

  3. #3
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039
    thats clever. so you can do that with any lib(dsound.lib, etc)?

  4. #4
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    Yes, you can. Compilers have other #pragmas so you might find it useful to look into it's options.
    If a tree falls in the forest, and no one is around to see it, do the other trees make fun of it?

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    12
    -Challenge Stupidity... I love that... lmao

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trouble Compiling 1394 Development Libraries for Linux
    By Phanixis in forum Linux Programming
    Replies: 6
    Last Post: 10-05-2007, 10:48 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. DirectSound header issues
    By dxfoo in forum C++ Programming
    Replies: 0
    Last Post: 03-19-2006, 07:16 PM
  4. trouble compiling
    By the Wookie in forum Linux Programming
    Replies: 1
    Last Post: 10-26-2005, 10:12 PM
  5. trouble compiling
    By chris285 in forum C++ Programming
    Replies: 5
    Last Post: 04-27-2003, 10:40 AM