tags:

views:

93

answers:

2

Hello everyone, i am having problem with running an example from qt which uses win32 libraries when i compile i dnt 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 inorder to get it worked under windows 7. PLease help me out.thanks in advance. 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
+1  A: 

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.

BastiBense
+2  A: 

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.

Stephen Chu