Results 1 to 11 of 11

Thread: How to add a .lib in Qt creator 2.3.1

  1. #1

    Default How to add a .lib in Qt creator 2.3.1

    I have tried adding my .lib file in .pro but it is not working properly, i can't access the functions which is defined in the library. I am working in windows platform. I am getting the following run time error(while building i am not getting any error) as shown in screenshot.

    error.jpg

    Sathish.
    Last edited by satiz01bravo; 10th April 2015 at 05:10. Reason: updated contents

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to add a .lib in Qt creator 2.3.1

    If you are not getting a build error, then the lib was properly added.

    Cheers,
    _

  3. #3

    Default Re: How to add a .lib in Qt creator 2.3.1

    @anda_skoa

    But i can't access the functions defined in .lib, thats the main issue. So, can i take it as .lib file is corrupted?

    Sathish.

  4. #4
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to add a .lib in Qt creator 2.3.1

    What do you mean by "i can't access the functions defined in .lib"? What happens if you try to compile, run, and debug a call to a function of the library?
    The message you get looks like an ordinary log message printed by a function when one of its preconditions is false. What does line 247 of ftdi_infra.c do? What "expression" could possibly be NULL when another value was expected?

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to add a .lib in Qt creator 2.3.1

    Quote Originally Posted by satiz01bravo View Post
    But i can't access the functions defined in .lib, thats the main issue. So, can i take it as .lib file is corrupted?
    You couldn't get a runtime error if you couldn't access a function defined in a lib because it would not have built and there would be nothing to run.

    The fact that you are able to start the program implies that the library was linked correctly, all symbols needed from it properly resolved.

    Cheers,
    _

  6. #6

    Default Re: How to add a .lib in Qt creator 2.3.1

    @yeye_olive
    That statement comes from .lib so i can't check it manually, because i don't have the source code for that specific library.

    Note:
    If i use this .lib in Microsoft Visual C++ 6.0 i can able to access that function, so is there any compatibility issue from VCC to Qt?

  7. #7
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to add a .lib in Qt creator 2.3.1

    Have you tried searching the Web for the error message you got? I did, and I found something that looks relevant:
    http://stackoverflow.com/questions/2...ftdis-libmpsse
    Have you read the documentation of the library and made sure you use it correctly?

  8. #8

    Default Re: How to add a .lib in Qt creator 2.3.1

    @yeye_olive
    Thanks for your effort, i too did that, but as i mentioned in my comment #1 i am working in windows platform, i have read the documentation of the library i found only details about the functions defined & OS platforms supportable. In that it is mentioned that it can be used both in windows and linux.

    Sathish.

  9. #9
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to add a .lib in Qt creator 2.3.1

    The stack overflow answer suggests that the error message is caused by a missing runtime dependency. Have you tried putting the required DLL files in the same directory as your .exe file?

  10. #10
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to add a .lib in Qt creator 2.3.1

    Quote Originally Posted by satiz01bravo View Post
    Thanks for your effort, i too did that, but as i mentioned in my comment #1 i am working in windows platform
    The StackOverflow discussion says this error is typical for when the library can't find its plugin.
    Have you checked that you have the respective DLL (since you are on Windows) in the directory of the application executable or in PATH?

    Cheers,
    _

  11. #11

    Default Re: How to add a .lib in Qt creator 2.3.1

    @ anda_skoa
    Yes, i have included .dll file in the path but still the problem persist, i also do have .a file but i don't have any idea what it will do and what is it for??

    Should i add .dll manually that means in .pro file should i have to give the link separately??

    Sathish.

Similar Threads

  1. Replies: 10
    Last Post: 16th June 2014, 15:40
  2. Replies: 1
    Last Post: 12th June 2014, 07:37
  3. Replies: 2
    Last Post: 11th June 2014, 08:17
  4. how to use VDL with Qt Creator 2.2.1
    By hitesh_ in forum Qt Tools
    Replies: 1
    Last Post: 29th February 2012, 02:52
  5. Replies: 2
    Last Post: 22nd November 2011, 00:09

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.