"Undefined reference to ..."

This is a discussion on "Undefined reference to ..." within the Windows Programming forums, part of the Platform Specific Boards category; When I try to compile my program, during the linking process, it gives me this error. Code: undefined reference to ...

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    151

    "Undefined reference to ..."

    When I try to compile my program, during the linking process, it gives me this error.

    Code:
    undefined reference to `CreateCompatibleDC@4'
    It does the same thing with other windows functions too. What is causing this?

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,255
    You need to link to Gdi32.lib
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    151
    Thanks, it worked!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 09:18 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 12:45 PM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  4. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 05:42 PM
  5. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21