Thread: directX program

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    62

    directX program

    I am trying to use directX9 in my program. It gives me
    [Linker error] undefined reference to `render()' .
    What should I do?

  2. #2
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    >>What should I do?

    Define it!

    Seriously, post some code, state compiler/OS, make sure you're linking the
    directx lib files with your project - other than that there's not much I can offer.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    62
    I declared render:
    Code:
    HRESULT render(void);
    I use it inside the message pump:

    Code:
    MSG  msg;
        int status;
        while ((status = GetMessage (&msg, 0, 0, 0)) != 0)  {
            if (status == -1)
                return -1;
            DispatchMessage (&msg);
            render();     // Here takes place rendering.
        }
        return msg.wParam;
    I have tryed to link to all libraries I have. I have linked to DirectX9 libraries and to the libraries, which are in Dev-C++ folder lib. It doesn't work.

  4. #4
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    I don't know anything about DirectX, but....well just a random guess. Isn't that the function that YOU'RE supposed to write?
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with my DirectX program
    By fighter92 in forum Game Programming
    Replies: 1
    Last Post: 01-23-2007, 06:28 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. Managed DirectX Programming Books (C# only!)
    By Grayson_Peddie in forum Game Programming
    Replies: 0
    Last Post: 05-05-2003, 02:54 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM