Results 1 to 6 of 6

Thread: QWT .lib files

  1. #1
    Join Date
    Jan 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default QWT .lib files

    Hi Guys,

    I'm sorry to post this but I have been trying to find a solution for this all over the net and have as so far been unable to fix my issue. So far i have done the following:
    • Downloaded qt 6.0.0
    • Opened up the qwt.config file and commented out QWT_CONFIG += QwtDll
    • I also changed QWT_INSTALL_PREFIX = C:\Qt\qwt-6.0.0
    • I than ran qmake qwt.pro (via the visual studio 2008 command line in the correct directory)
    • Then nmake
    • This seems to have built sucessfully.
    • In visual studio i set the VC++ Directores include to C:\Qt\qwt-6.0.0\src
    • Then the libary to C:\Qt\qwt-6.0.0\lib
    • I then in the linker for my project in debug add in qwtd.lib


    Now I try to build my project and i get LINK : fatal error LNK1181: cannot open input file 'qwtd.lib', i have checked the lib folder and there are only qwtd.dll type files.

    In short have I missed a step off i have tried this multiple times and am a bit stuck?

    Thanks

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,321
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QWT .lib files

    What happens if you don't comment out the QWT_CONFIG += QwtDll entry?

    When I import the .pro file into Visual Studio 2008 (using the Qt Visual Studio add-on) the resulting solution creates all of the expected files (.lib, .dll, .exp, .ilk, .pdb) in the lib folder.

  3. #3
    Join Date
    Jan 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWT .lib files

    still doesn't work it comes up with an identical message.

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,321
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QWT .lib files

    If the .lib files are not present in the Qwt lib folder, then Qwt did not build correctly. Start over with the original Qwt .pro file (before you edited it), and build Qwt straight out of the box. If that works, then figure out what you did wrong when you edited the .pro file.

  5. #5
    Join Date
    Jan 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWT .lib files

    Thanks for the feedback d_stranz,I must admit i'm fresh from java world so still getting my head around .lib and .dll files.

    After about a day I have finally found how to fix the issue i was having so I though I would post it up for any other people that might be having issues!.

    Firstly download the latest version of the Source code file not the .exe from the qwt sourceforge page then unzip the file to some location.
    Then presuming you have installed the QT for windows visual studio (VS2008 in my case) , you should have an item in your start menu similar to this:
    Untitled.png

    Click on the qt 4.8.0 command prompt and click the icon, this should launch visual studio. Then in visual studio go to qt -> open qt project file, and select qwt.pro in the folder you unzipped, when it's loaded in you will get a couple of warnings about licencing don't worry. Then just hit f7 to build your project and make your self a cup of tea. When you get back check that inside the unzipped qwt folder there are some .lib files within the lib folder. * This is a simple solution and the instructions in the qwt file are slightly confusing, Don't try using the visual studio command line as it will make you have a bad day* hope this helps someone.


    Added after 1 33 minutes:


    I still have on niggly problem though and that's getting the plugin to work in the qdesigner. I have copied across the qwt_designer_plugin.lib and the qwt_designer_plugin.dll file and placed them in the designer folder (4.8.0\plugins\designer), I have also added the the lib folder of the qwt folder containing qwt.dll to my path folder. I have also cleared out the registry key as per some of the other comments on this forum, when i fire up qt designer and check the plugins I get an error message saying:
    "...using incompatible types Expected build key windows msvc release full-config, got windows mingw release full config"
    . does this mean that qt designer was built using mingw if so can i recompile it to use msvc ?
    Last edited by Suths; 12th April 2012 at 15:06.

  6. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,321
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QWT .lib files

    . does this mean that qt designer was built using mingw if so can i recompile it to use msvc ?
    Yes, I think that is the problem here. I do not use mingw, only Visual Studio, so I always rebuild Qt and Qwt from source code so that everything is compatible. I also import the .pro file into VS using the Qt add-on, so the Qwt Designer plugin does not get installed properly unless you modify the project settings to change the output directory.

    I suspect this error message is due to C++ name mangling being different in VC++ and mingw compilers, so DLLs and EXEs are not interchangeable.

    P.S. Fixing a cup of coffee also works when building Qwt. Fixing a cup of coffee and lunch is necessary when building Qt.

Similar Threads

  1. Replies: 1
    Last Post: 15th August 2011, 23:26
  2. Replies: 9
    Last Post: 28th April 2010, 09:18
  3. Replies: 12
    Last Post: 17th June 2009, 05:34
  4. visual studio project files - adding extra files
    By luf in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 21:05
  5. how to save sequences of text files and sound files
    By nagpalma in forum Qt Programming
    Replies: 8
    Last Post: 3rd July 2007, 00:06

Tags for this Thread

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.