PDA

View Full Version : Program works in Release but not Debug



Ferric
28th January 2010, 00:31
Hi,

I have a program that runs fine when I select "Build>Set Build Configuration> Release" however when I select "Build>Set Build Configuration>Debug" I get the following: error: collect2: ld returned 1 exit status


This is my project file:



# -------------------------------------------------
# Project created by QtCreator 2010-01-05T15:47:40
# -------------------------------------------------
TARGET = LoaderV5
TEMPLATE = app
DEPENDPATH += .
INCLUDEPATH += ../..
QMAKE_LIBDIR += ../../build
OBJECTS_DIR = obj
MOC_DIR = moc
UI_DIR = uic
CONFIG += qt \
thread \
warn_on \
console # To see any output from qDebug(), you must add a line reading CONFIG += console to the project file.
SOURCES += main.cpp \
loader.cpp \
addDialog.cpp
HEADERS += loader.h \
qextserialport.h \
qextserialbase.h \
win_qextserialport.h \
addDialog.h
FORMS += loader.ui
CONFIG(debug, debug|release):LIBS += -lqextserialportd
else:LIBS += -lqextserialport
unix:DEFINES = _TTY_POSIX_
win32:DEFINES = _TTY_WIN_

schnitzel
28th January 2010, 00:46
look at compile output inside Qt Creator, that will let you know why the link failed - my guess you don't have a debug version of qextserialport library.

Ferric
28th January 2010, 01:08
my guess you don't have a debug version of qextserialport library.

Yeah, you hit the nail on the head :cool: cheers once again, it is working now.