yes, i use the commercial version of qt on windows. but i do not use the
vs ide. i use xemacs and msys.
regards,
jh
yes, i use the commercial version of qt on windows. but i do not use the
vs ide. i use xemacs and msys.
regards,
jh
Commercial Qt but not VS ??? Sounds quite weird but anyway : MSYS uses MinGW AFAIK so you definitely don't need any .lib file! Can build your lib and check for a .a file??? If it is not present you should take care of the macro stuff mentioned earlier in the thread and if it is all you troubles should seem so far away...![]()
Current Qt projects : QCodeEdit, RotiDeCode
i bought and installed visual studio C++, but i do not use the IDE
because i do not like the editor. i use xemacs for editing source code,
msys as a shell and just the plain c++ compiler (cl, link) to compile
and link the code. almost the same way i used to compile code when
i programmed on unix systems. i even wrote makefiles by myself but
now i also want my qt programs on my MacMini (opensource version of qt,
gnu c++). so i started playing around with qmake to generate makefiles. but when
i specify a shared lib i only get the dll without the import library (.lib)
on windows, which i need to link the library to the exe.
best regards,
jh
i know that .a is only for gnu. the problem is not on the Mac.
the problem is on the windows side (MS VC++) because i do not
get the .lib, only the .dll ?!
here is my .pro file:
Qt Code:
TEMPLATE = lib # CONFIG += dll # CONFIG += staticlib CONFIG += static_and_shared DEFINES += _VMP_WINDOWS_ # DEFINES += _DEBUG_basic_hashcode_ QMAKE_CLEAN += *~ TARGET = basic DEPENDPATH += . INCLUDEPATH += . QT += network VERSION = 1.0.0 target.path = ../_libs INSTALLS += target # Input HEADERS += basic.h Exception.h MessageService.h SOURCES += basic.cpp Exception.cpp MessageService.cppTo copy to clipboard, switch view to plain text mode
i run qmake, i run nmake and get a .dll (but no .lib)
jh
Want a .dll (and its import lib) only? Use "CONFIG += dll".
What's the point of "target.path = ../_libs" ? AFAIK the install mechanism is rarely used on windows (binary installer are fvored) and besides doesn't make much sense here... Don't you think "DESTDIR = ../_libs" would be better ?
Current Qt projects : QCodeEdit, RotiDeCode
thanx for the hint. i tried CONFIG += dll but it still does
not work. the dll is build but still the .lib is not build.
but anyway the compiler tries to copy the .lib which is not build. do i have to
build an static version first?
regards,Generieren von Code...
link /LIBPATH:"c:\Qt\4.1.4-com\lib" /NOLOGO /INCREMENTAL:NO /INCREMENTAL:NO /DLL /OUT:"release\model.dll" @C:/DOKUME~1/jh/LOKALE~1/Temp\nm21.tmp
copy /y "release\model.lib" "c:\01. - Arbeit\C++\shared_libs\basic\libs\model.lib"
Das System kann die angegebene Datei nicht finden.
copy /y "release\model.dll" "c:\01. - Arbeit\C++\shared_libs\basic\libs\model.dll"
1 Datei(en) kopiert.
jh
Last edited by jacek; 4th March 2007 at 14:46. Reason: changed [code] to [quote]
I've never used MSVC but by comparing the two build commands (your own and the above one) it is obvious than the /implib switch is missing (BTW M$ switch syntax sucks a great deal... :P ). If you're sure that this hasn't been caused by a manipulation of yours you should report the bug to Trolltech and waiting for a fix you can always try this workaround :
Qt Code:
QMAKE_LINK_SHLIB_CMD += /implib:$${TARGET}.libTo copy to clipboard, switch view to plain text mode
Hope this helps.![]()
Last edited by jacek; 4th March 2007 at 14:46. Reason: changed [code] to [quote]
Current Qt projects : QCodeEdit, RotiDeCode
jh (4th March 2007)
I've been running into this same problem. I created a project using MinGW, and now want to build with MSVC. Below is what I added to the .pro file, and is working for me (non of the above did).
win32-msvc* {
LIBS += Advapi32.lib Setupapi.lib
CONFIG -= dll
CONFIG += shared static
}
The LIBS was required as the "difference" of mingw.
Bookmarks