Results 1 to 1 of 1

Thread: unresolved external symbol

  1. #1
    Join Date
    Sep 2016
    Posts
    78
    Thanked 1 Time in 1 Post
    Qt products
    Qt5

    Default Re: unresolved external symbol

    Hi i need help with these type of errors:
    tecladoyraton.obj:-1: error: LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function "short __cdecl comprobarTeclas(void)" (?comprobarTeclas@@YAFXZ)
    Code:

    Qt Code:
    1. #include "../headers/tecladoyratonwin.h"
    2. #include <windows.h>
    3.  
    4. void enviarTecla(int tecla)
    5. {
    6. switch (tecla)
    7. {
    8. case Qt::Key_Return:
    9. tecla = VK_RETURN;
    10. break;
    11. case Qt::Key_Backspace:
    12. tecla = VK_BACK;
    13. break;
    14. case Qt::Key_Escape:
    15. tecla = VK_ESCAPE;
    16. break;
    17. case Qt::Key_Shift:
    18. tecla = VK_SHIFT;
    19. break;
    20. case Qt::Key_CapsLock:
    21. tecla = VK_CAPITAL;
    22. break;
    23. }
    24. keybd_event(tecla, 0, 0, 0);
    25. keybd_event(tecla, 0, KEYEVENTF_KEYUP, 0);
    26. }
    27.  
    28. void hacerClickDerechoP()
    29. {
    30. mouse_event( MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0 );
    31. }
    32.  
    33. void hacerClickIzquierdoP()
    34. {
    35. mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
    36. }
    37. void hacerClickDerechoS()
    38. {
    39. mouse_event( MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0 );
    40. }
    41.  
    42. void hacerClickIzquierdoS()
    43. {
    44. mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
    45. }
    46. short comprobarTeclas()
    47. {
    48. short i = 0;
    49. for(i = 0; i < 255; i++){
    50. if(GetAsyncKeyState(i) == -32767)
    51. return i;
    52. }
    53. return 0;
    54. }
    To copy to clipboard, switch view to plain text mode 

    Code of header:
    Qt Code:
    1. #ifndef TECLADOYRATONWIN_H
    2. #define TECLADOYRATONWIN_H
    3. #include <Qt>
    4.  
    5. void enviarTecla(int tecla);
    6. void hacerClickDerechoP();
    7. void hacerClickIzquierdoP();
    8. void hacerClickDerechoS();
    9. void hacerClickIzquierdoS();
    10. short comprobarTeclas();
    To copy to clipboard, switch view to plain text mode 


    Added after 1 7 minutes:


    solved it is solved
    Last edited by anda_skoa; 24th September 2016 at 10:34. Reason: changed [quote] to [code]

Similar Threads

  1. unresolved external symbol for QGLWidget
    By Wasabi in forum Newbie
    Replies: 1
    Last Post: 13th May 2011, 11:56
  2. unresolved external symbol
    By gridolfi in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2009, 17:58
  3. unresolved external symbol
    By tgreaves in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2009, 19:49
  4. Unresolved External Symbol
    By munna in forum General Discussion
    Replies: 1
    Last Post: 10th May 2006, 19:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.