Results 1 to 6 of 6

Thread: qwt.lib instead of qwt.a

  1. #1
    Join Date
    Nov 2009
    Posts
    17
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qwt.lib instead of qwt.a

    Hi Quts' & Qwuts' ()

    I need some help while compiling the Qwt in MSVS 2005.

    I have no problem while compiling and using the Qwt in Qt Creator with mingw. I link my application against this libqwt5.a and the qwt.dll is kept in the right place &the PATH variableis able to locate it.

    As my original application uses MSVS 2005, I have to compile the Qwt in MSVS.
    So now I am compiling in MSVS2005,
    If I compile the qwt source code version 5.2.1, the
    *libqwtd5.a &
    *qwtd5.dll
    are created in the qwt lib directory.

    I was wondering why It is creating the qwt.a file instead of qwt.lib file. I need the .lib file because the original application is linked with Qt in that way. I mean using qt*.lib & qt*.dll.
    So, I tried several ways to create the qwt.lib, but it always creates the qwt.a and a qwt.dll

    Please suggest how to generate the qwt.lib instead of qwt.a

    Please reply. (Wysota, Could you please?)
    Last edited by uppu; 17th November 2009 at 07:05.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt.lib instead of qwt.a

    .lib files are created by MSVC++
    .a files are created by GCC/G++

    As far as I'm aware, neither product can use the others library files.

    EDIT: Actually, I've just checked, and my .lib files start with "!<arch>" too. I thought only .a files started with that. You can confirm by searching the file for ".gcc" (as it'll normally contain entries such as ".gcc_except_table") whereas MSVC will have dependancies on the RTL, so you can probably search for ".crt".
    Last edited by squidge; 17th November 2009 at 08:39.

  3. The following user says thank you to squidge for this useful post:

    uppu (17th November 2009)

  4. #3
    Join Date
    Nov 2009
    Posts
    17
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qwt.lib instead of qwt.a

    yes friend,

    but why should it create the qwt.a while I am compiling using "nmake".

    I compiled the qwt src like this

    > qmake qwt.pro

    > admin\msvc-qmake.bat vc

    but this command generated errors like

    Qt Code:
    1. WARNING: Unable to generate output for:
    2. ../qwt/examples/sysinfo//Makefile.Debug [TEMPLATE vcapp]
    3. WARNING: Unable to generate output for: ..
    4. qwt/examples/sysinfo//Makefile.Release [TEMPLATE vcapp]
    To copy to clipboard, switch view to plain text mode 

    so I created the makefiles instead like this
    > admin\msvc-qmake.bat

    >nmake

    please note, I used nmake which is MSVC++ tool.

    So, It should have created the qwt.lib instead of qwt.a. right?

    and yes, I comfirmed that it starts with !arch, so it is dot a file and not lib.

  5. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qwt.lib instead of qwt.a

    Are you sure it generated a .a file? I've had it before where I thought it did, but then when I emptied the directory and reran nmake, I found it didn't actually create a file at all and the .a was a leftover from a previous GCC compilation.

    Is mkspecs correct? You can get nmake to run GCC.

  6. The following user says thank you to squidge for this useful post:

    uppu (17th November 2009)

  7. #5
    Join Date
    Nov 2009
    Posts
    17
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qwt.lib instead of qwt.a

    I found that in my PATH variable it was locating the mingw g++

    Now I removed that path variable and compiled again

    > ..\qwt>qmake qwt.pro

    > ..\qwt>admin\msvc-qmake.bat

    > nmake

    & now it got this error message

    Qt Code:
    1. NMAKE : warning U4006: special macro undefined : '$<'
    2. compiling
    3. 'g++' is not recognized as an internal or external command,
    4. operable program or batch file.
    5. NMAKE : fatal error U1077: 'echo' : return code '0x1'
    6. Stop.
    7. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
    8. Stop.
    9. NMAKE : fatal error U1077: 'cd' : return code '0x2'
    10. Stop.
    To copy to clipboard, switch view to plain text mode 

    Could you please help me to fix this issue now? Your help would be very much appreciated mate.

  8. #6
    Join Date
    Nov 2009
    Posts
    17
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qwt.lib instead of qwt.a

    Hey friend,

    There was a slight mess in my machine build environment.

    After I cleaned the env, it is working fine, thank you very much for your time

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.