sneha
sneha

Reputation: 1

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

Upvotes: 0

Views: 272

Answers (2)

Stephen Chu
Stephen Chu

Reputation: 12832

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.

Upvotes: 2

BastiBen
BastiBen

Reputation: 19880

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.

Upvotes: 0

Related Questions