Thread: Reading Pixels

  1. #1
    Registered User
    Join Date
    Oct 2010

    Reading Pixels

    <<< Split from Read Pixel >>>

    Hi, I am having problems in this area.
    I understand about the handle and the device context.
    My problem is not with the syntax, but with the linking.
    I get the message [Linker error] undefined reference to 'GetPixel@12'

    -I am using Dev-C++ compiler.

    -I have included the headers:
    <windows.h> and/or <wingdi.h>

    I had a look at the msdn website at the GetPixel function, and i see that i require the files:
    I downloaded the libraries of the latest SDK and added the file gdi32.lib to my dev-c++\lib file.
    I could not find the file gdi32.dll among the downloaded files, however I did
    locate several instances when I searched the Hard Drive:
    -one in c:\Windows\system32.
    -many others in C:\Windows\winsxs
    one of which I coppied and added to my Dev-C++\lib file.

    I still Get the error when trying to compile: [Linker error] undefined reference to 'GetPixel@12'.
    -Is the GetPixel function compatible with my compiler?
    -Have I added the dll and lib files in the correct location?
    -Do the files rely on other files which also need to be added?

    Thank you for any help you are able to provide.

  2. #2
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002


    to linker project options. meow.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 07:27 AM
  2. Resetting a ifstream object after reading the whole file
    By Zeeshan in forum C++ Programming
    Replies: 5
    Last Post: 03-31-2008, 08:03 AM
  3. Replies: 2
    Last Post: 01-28-2008, 03:07 AM
  4. help with reading from stream
    By movl0x1 in forum C Programming
    Replies: 7
    Last Post: 05-31-2007, 10:36 PM
  5. Fun with reading hex
    By dpro in forum C++ Programming
    Replies: 7
    Last Post: 02-17-2006, 06:41 PM