Results 1 to 8 of 8

Thread: Problems using a DLL

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    15
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    4

    Default Problems using a DLL

    Hello everyone. I´m using Qt 4.2.2 and VisualStudio 2005.
    My problem is I wanna make use of a Dll and I only get linking errors related to it.
    I want to load the dll at compiling time, so I guess I don´t need to use QLibrary, am I right?
    I have a header file with the name of the functions I can call.

    Here it is the .h file (loc.h):

    Qt Code:
    1. #ifndef LOC_H
    2. #define LOC_H
    3.  
    4. #ifdef __cplusplus
    5. extern "C" {
    6. #endif
    7.  
    8. #include <windows.h>
    9. #define LOC_ERR_FRAME_INCOMPL -1
    10. #define LOC_ERR_LONG -2
    11. #define LOC_ERR_CRC -3
    12.  
    13. typedef struct loc_position_t {
    14. float x;
    15. float y;
    16. } loc_position_t;
    17.  
    18.  
    19. int loc_getposition(loc_position_t *p);
    20. int loc_ini(void);
    21. int loc_end(void);
    22.  
    23. #ifdef __cplusplus
    24. }
    25. #endif
    26.  
    27. #endif //LOC_H
    To copy to clipboard, switch view to plain text mode 


    I also include the dll file so you can see what it´s wrong.

    I have used this code in Code::blocks without a problem, but now I wanna use it with Qt/VisualStudio and I get linking problems everytime I try to compile it.

    Can anyone please help me?
    Attached Files Attached Files

Similar Threads

  1. Problems with Unicode(UTF8)
    By cristiano in forum Qt Programming
    Replies: 15
    Last Post: 5th December 2006, 12:33
  2. QGLWidget Problems
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 2nd October 2006, 22:06
  3. Problems building mysql plugin for Qt 4.1.2 on windows XP
    By Philip_Anselmo in forum Installation and Deployment
    Replies: 3
    Last Post: 17th May 2006, 15:38
  4. Canvas problems
    By Tommytrojan in forum Qt Programming
    Replies: 22
    Last Post: 9th May 2006, 16:46
  5. QT4 Plugins - problems, problems
    By NormanDunbar in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2006, 15:39

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
  •  
Qt is a trademark of The Qt Company.