开发者

qt in windows7 environment

I am having a problem with running an example from qt which uses win32 libraries. When I compile I don't get any errors but when I run it is not able to open the application (.exe) file in Windows开发者_开发百科 7. But when I compile this example in WindowsXP it works fine. Can anyone let me know whether I need to change my .pro file in order to get it worked under Windows 7?

Here is my .pro file:

# -------------------------------------------------
# Project created by QtCreator 2010-04-16T11:45:43
# -------------------------------------------------
QT += network
QT += xml
QT += opengl
TARGET = Application
TEMPLATE = app
SOURCES += main.cpp \
    mainwindow.cpp \
    Tools.cpp \
    Objects.cpp
HEADERS += mainwindow.h \
        Tools.h\
        Objects.h
unix { 
    OBJECTS_DIR = .obj
    MOC_DIR = .moc
}

# UNIX installation
isEmpty(PREFIX):PREFIX = /usr/local
unix { 
    headers.path = $$PREFIX/include/ZIP
    headers.files = $$HEADERS
    target.path = $$PREFIX/lib
    INSTALLS += headers \
        target
}
!mac:x11:LIBS += -ldns_sd
win32:LIBS += -ldnssd
LIBPATH = C:/Temp/mDNSResponder-107.6/mDNSWindows/DLL/Debug
INCLUDEPATH += c:/Temp/mDNSResponder-107.6/mDNSShared


You can use Dependency Walker to help you find out what Qt DLLs are needed and copy them to the same folder as the .exe.


Your problem is probably because Windows can't find the Qt libraries. Try placing the required Qt libraries (for instance QtNetwork4.dll, etc...) in the same directory as your .exe and see if it works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜