News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Fails to compile due to "undefined reference"

Started by feacode, November 26, 2008, 01:49:27 AM

Previous topic - Next topic

feacode

I am new to Code Blocks.  I have been working with Qt 4 (4.4.3), studying the examples in the book C++ GUI Programming with Qt 4. I am able to successfully compile and run examples using standard method of "qmake -project, qmake *.pro, make" without any problems.  I am using GNU GCC compiler.

When I build the same files in Code Blocks by copying exact duplicates of code from the book, I get these types of errors:  "undefined reference to 'FindDialog::FindDialog(QWidget*)" on the following line of code "FindDialog *dialog = new FindDialog;"  I am working in Windows XP and I have installed QtWorkBench plugin.

Same error occurs when I compile other programs with similar code lines.

Any help on what I need to do to correct this error would be appreciated.  Thank you in advance.