PDA

View Full Version : qwt.lib instead of qwt.a



uppu
17th November 2009, 06:59
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?)

squidge
17th November 2009, 08:14
.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".

uppu
17th November 2009, 08:26
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


WARNING: Unable to generate output for:
../qwt/examples/sysinfo//Makefile.Debug [TEMPLATE vcapp]
WARNING: Unable to generate output for: ..
qwt/examples/sysinfo//Makefile.Release [TEMPLATE vcapp]


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. :(

squidge
17th November 2009, 08:36
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.

uppu
17th November 2009, 08:49
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 :(


NMAKE : warning U4006: special macro undefined : '$<'
compiling
'g++' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'echo' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.


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

uppu
17th November 2009, 11:50
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