I have a small program composed by two cpp modules, and a unique signal/slot connection.
It compiles and runs perfectly in Win7 under Qt Creator 2.4.1/qt 4.8.1/MSVC2010.
Instead, in a Max Os X, using QtCreator 2.4.1/qt 4.8.1/gcc, I get the following strange error messages.
In issues:
:-1: error: symbol(s) not found for architecture x86_64
:-1: error: collect2: ld returned 1 exit status
In compile output:
ld: warning: directory not found for option '-L/usr/local/pgsql/lib'
ld: warning: directory not found for option '-L/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib'
ld: warning: directory not found for option '-F/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib'
Undefined symbols for architecture x86_64:
"vtable for CLineChart", referenced from:
CLineChart::CLineChart(QWidget*)in clinechart.o
CLineChart::CLineChart(QWidget*)in clinechart.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"CLineChart::staticMetaObject", referenced from:
CLineChart::tr(char const*, char const*)in clinechart.o
"CLineChart::valuesChanged(SXYValues, bool, bool)", referenced from:
CLineChart::mouseMoveEvent(QMouseEvent*) in clinechart.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [TestLineChart.app/Contents/MacOS/TestLineChart] Error 1
make: Leaving directory `/Users/ceraolo/Documents/C++/TestLineChartAAA'
11:09:15: The process "/usr/bin/make" exited with code 2.
Error while building project TestLineChart (target: Desktop)
When executing build step 'Make'
I've verified that if I eliminate all slots and signals but leave the QT_OBJECT macro in the code the problem is still there.
When I comment out the QT_OBJECT also the program compiles and links, but, obviously I lose important functionality.
Any suggestions?
Bookmarks