Compile problems

David Sharp david.m.sharp at btopenworld.com
Tue Jul 15 02:03:13 CEST 2003


Hi,

I am learning to code using QT, moving away from the Linux platform I am 
used to, and using Windows instead. Since I still want access to an X 
server, I have started using Cygwin, with the QT port which is available.

However, I am having trouble getting the code to compile, or, more 
acuratly, link.

Any ideas? I would really appreciate the help!

Here is the command and output :


dave at laptop ~
$ gcc -lqt -L /usr/local/lib/qt2/lib -I /usr/local/lib/qt2/include hello.cpp

hello.cpp:18:2: warning: no newline at end of file
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x4b):hello.cpp: 
undefined reference to `QApplication::QApplication[in-charge](int&, char**)'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x71):hello.cpp: 
undefined reference to `QWidget::QWidget[in-charge](QWidget*, char 
const*, unsigned)'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x8f):hello.cpp: 
undefined reference to `QWidget::setMinimumSize(int, int)'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0xad):hello.cpp: 
undefined reference to `QWidget::setMaximumSize(int, int)'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0xc3):hello.cpp: 
undefined reference to `QString::QString[in-charge](char const*)'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0xed):hello.cpp: 
undefined reference to `QPushButton::QPushButton[in-charge](QString 
const&, QWidget*,
char const*)'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x150):hello.cpp: 
undefined reference to `QPushButton::setGeometry(int, int, int, int)'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x165):hello.cpp: 
undefined reference to `QApplication::setMainWidget(QWidget*)'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x173):hello.cpp: 
undefined reference to `QWidget::show()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x17e):hello.cpp: 
undefined reference to `QApplication::exec()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x192):hello.cpp: 
undefined reference to `QPushButton::~QPushButton [in-charge]()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x1a0):hello.cpp: 
undefined reference to `QWidget::~QWidget [in-charge]()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x1ab):hello.cpp: 
undefined reference to `QApplication::~QApplication [in-charge]()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x1d3):hello.cpp: 
undefined reference to `QPushButton::~QPushButton [in-charge]()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x1f5):hello.cpp: 
undefined reference to `QWidget::~QWidget [in-charge]()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text+0x214):hello.cpp: 
undefined reference to `QApplication::~QApplication [in-charge]()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text$_ZN7QStringD1Ev+0x1e):h
ello.cpp: undefined reference to `QString::shared_null'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text$_ZN7QStringD1Ev+0x26):h
ello.cpp: undefined reference to `QString::shared_null'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.text$_ZN7QStringD1Ev+0x37):h
ello.cpp: undefined reference to `QStringData::deleteSelf()'
/cygdrive/c/DOCUME~1/dave/LOCALS~1/Temp/ccwALchA.o(.eh_frame+0x12):hello.cpp: 
undefined reference to `___gxx_personality_v0'
collect2: ld returned 1 exit status




More information about the kde-cygwin mailing list