Results 1 to 5 of 5

Thread: Problem with link of external Library

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Problem with link of external Library

    Hi,

    thanks for your help, but this still doesnt work:

    I tried it like:
    LIBS += -L/Libs -mathlib

    is this ok by your idea?

    Thank you very much for your help

  2. #2
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    24
    Thanked 17 Times in 14 Posts

    Default Re: Problem with link of external Library

    hummm...

    Does the add function is :add(double, double) ? Because if it its parameters are integers or floats your compiler are sending 1 and 2 as double. So try to store 1 and 2 into integer or float variables A and B. And call add(A,B); to see if it works.

    Can you paste mathlib.h? I cannot find any copy on the web to check the add() function.

    Best.
    Last edited by qlands; 4th May 2011 at 08:17.

  3. #3
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 86 Times in 81 Posts

    Default Re: Problem with link of external Library

    The correct syntax is

    Qt Code:
    1. LIBS += -L/Libs -lmathlib
    To copy to clipboard, switch view to plain text mode 

    not the l (lowercase el) before the library name

    I think you need to improve your knowledge about building and linking executables
    Last edited by mcosta; 4th May 2011 at 08:21. Reason: updated contents
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. how to link external library in qt linux?
    By qtlinuxnewbie in forum Qt Programming
    Replies: 2
    Last Post: 5th March 2010, 09:11
  2. Replies: 0
    Last Post: 1st November 2009, 20:28
  3. Problem with NCReport : can't link shared library !
    By QAmazigh in forum Qt Programming
    Replies: 4
    Last Post: 5th June 2009, 23:38
  4. Replies: 2
    Last Post: 14th January 2008, 18:09
  5. How to open external page link using tabwidget
    By jyoti in forum Qt Programming
    Replies: 2
    Last Post: 13th November 2006, 10:43

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.