NO

Author Topic: Trouble linking with functions defined in winuser.h  (Read 1858 times)

beethoven3567

  • Guest
Trouble linking with functions defined in winuser.h
« on: July 23, 2020, 07:12:06 AM »
I've run into a problem while trying to compile a project called PDCurses, which provides functionality that is similar to that of the Linux curses library.
I'm getting 12 errors regarding unresolved symbols that are clearly defined in winuser.h.
For example,
POLINK: error: Unresolved external symbol '__imp_OpenClipboard' - referenced from 'C:\Users\todde\OneDrive\Documents\Pelles C Projects\CursesTest2\output\pdcclip.obj'.

pdcclip.c includes the header file "pdcwin.h" which in turn includes windows.h , which in turn includes winuser.h
I've attached pdcclip.c and pdfcwin.h

I've tried various compiler and linker options with no luck. I've also tried including winuser.h directly into pdfcwin.h, but same errors.
Thank you in advance for your help.  :)

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: Trouble linking with functions defined in winuser.h
« Reply #1 on: July 23, 2020, 10:25:59 AM »
Have you tried to add user32.lib to the linker?
best regards
 Alex ;)

beethoven3567

  • Guest
Re: Trouble linking with functions defined in winuser.h
« Reply #2 on: July 23, 2020, 06:26:47 PM »
It works!!! Thank you Alex!!!  :)