ist vermutlich leicht OT da es nicht direkt ein QT Problem ist, ich hoffe aber, das Ihr mir trotzdem helfen könnt & wollt.
Meine Umgebung: Win XP, QT 4.2.2, VisualStudio Express 2005 und eine Lib eines Bekannten (soweit ich weiß mit VS 6 übersetzt).
Ich habe ein minimal QT Programm bestehend aus:
main.cpp
hauptfenster.cpp
hauptfenster.h
hauptfenster.ui
meine pro Datei sieht so aus:
Code: Alles auswählen
TEMPLATE = app
TARGET =
DEPENDPATH += . include src ui
INCLUDEPATH += . include
# Input
HEADERS += include/hauptfenster.h
FORMS += ui/hauptfenster.ui
SOURCES += src/hauptfenster.cpp src/main.cpp
win32:LIBS += D:/Dokumente/Develop/QT_COMPort/lib/vlib2.libCode: Alles auswählen
#include <QtGui/QtGui>
#include <hauptfenster.h>
#include <stdio.h>
#include <vconnect2.h>
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
app.setQuitOnLastWindowClosed(true);
app.setStyle("plastique");
StdBase * base = new StdBase;
base->show();
// Hier kommt nun testweise die Sache mit VConnect
VConnect * vCom;
vCom = new VConnect();
vCom->open("COM1","9600:8:N:1");
return app.exec();
}
Wenn ich das allerdings nutzen möchte, bekomme ich folgende Fehlermeldung beim linken:
Code: Alles auswählen
D:\Dokumente\Develop\QT_COMPort>nmake
Microsoft (R) Program Maintenance Utility, Version 8.00.50727.42
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
"C:\Programme\Microsoft Visual Studio 8\VC\BIN\nmake.exe" -f Makefile.Debug
Microsoft (R) Program Maintenance Utility, Version 8.00.50727.42
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
cl -c -nologo -Zm200 -GS -Od -Zi -Gm -MDd -GR -EHsc -W3 -DUNICODE -DQT_L
ARGEFILE_SUPPORT -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
-DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"C:/Programme/Qt/4.2.2
-os/include/QtCore" -I"C:/Programme/Qt/4.2.2-os/include/QtCore" -I"C:/Programme/
Qt/4.2.2-os/include/QtGui" -I"C:/Programme/Qt/4.2.2-os/include/QtGui" -I"C:/Prog
ramme/Qt/4.2.2-os/include" -I"." -I"include" -I"C:/Programme/Qt/4.2.2-os/include
/ActiveQt" -I"debug" -I"." -I"c:\Programme\Qt\4.2.2-os\mkspecs\win32-msvc2005" -
Fodebug\ @C:\DOKUME~1\Martin\LOKALE~1\Temp\nm7.tmp
main.cpp
link /LIBPATH:"c:\Programme\Qt\4.2.2-os\lib" /NOLOGO /DEBUG /SUBSYSTEM:W
INDOWS /incremental:no /OUT:"debug\QT_COMPort.exe" @C:\DOKUME~1\Martin\LOKALE~1\
Temp\nm8.tmp
vlib2.lib(vconnect.obj) : warning LNK4075: /EDITANDCONTINUE wird aufgrund der An
gabe von /INCREMENTAL:NO ignoriert.
LINK : fatal error LNK1104: Datei "libcid.lib" kann nicht geöffnet werden.
NMAKE : fatal error U1077: ""C:\Programme\Microsoft Visual Studio 8\VC\BIN\link.
EXE"": Rückgabe-Code "0x450"
Stop.
NMAKE : fatal error U1077: ""C:\Programme\Microsoft Visual Studio 8\VC\BIN\nmake
.exe"": Rückgabe-Code "0x2"
Stop.
D:\Dokumente\Develop\QT_COMPort>