Reading Pixels

This is a discussion on Reading Pixels within the Windows Programming forums, part of the Platform Specific Boards category; <<< Split from http://cboard.cprogramming.com/c-pro...ead-pixel.html >>> Hi, I am having problems in this area. I understand about the handle and the ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    1

    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++ 4.9.9.2 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:
    -gdi32.lib
    -gdi32.dll
    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'.
    Questions:
    -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
    Posts
    638
    try

    ../lib/libgdi32.a

    to linker project options. meow.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 06: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, 02: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, 05:41 PM

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