[Qt-interest] newbie having trouble compiling wiggly demo on Mac

Richard richardmg at trolltech.com
Fri May 22 11:55:46 CEST 2009


Are you sure you copied all header files? It looks like you forgot  
wigglywidget.h.

-Richard


Den May 21, 2009 kl. 2:41 AM skrev Eric Smith:

> I'm using qt-sdk-mac-opensource-2009.02.dmg on Mac OS 10.5.6. gcc
> --version reports i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc.
> build 5484).
>
> Since I don't want to use Xcode, I copied all of the .h and .cpp files
> of the wiggly demo directory into a new directory, then did:
>
> qmake -project
> qmake -spec macx-g++
> make
>
> The two invocations of qmake didn't give any complaints, but make  
> does:
>
> $ make
> g++ -c -pipe -g -gdwarf-2 -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB
> -DQT_SHARED -I/usr/local/Qt4.5/mkspecs/macx-g++ -I.
> -I/Library/Frameworks/QtCore.framework/Versions/4/Headers
> -I/usr/include/QtCore
> -I/Library/Frameworks/QtGui.framework/Versions/4/Headers
> -I/usr/include/QtGui -I/usr/include -I. -I. -I. -I.
> -F/Library/Frameworks -o dialog.o dialog.cpp
> dialog.cpp: In constructor ‘Dialog::Dialog(QWidget*)’:
> dialog.cpp:51: error: ‘WigglyWidget’ was not declared in this scope
> dialog.cpp:51: error: ‘wigglyWidget’ was not declared in this scope
> dialog.cpp:51: error: expected type-specifier before ‘WigglyWidget’
> dialog.cpp:51: error: expected `;' before ‘WigglyWidget’
> dialog.cpp:55: error: no matching function for call to
> ‘QVBoxLayout::addWidget(<type error>)’
> /Library/Frameworks/QtGui.framework/Versions/4/Headers/qboxlayout.h: 
> 85:
> note: candidates are: void QBoxLayout::addWidget(QWidget*, int,
> Qt::Alignment)
> dialog.cpp:60: error: no matching function for call to
> ‘Dialog::connect(QLineEdit*&, const char*, <type error>, const char*)’
> /Library/Frameworks/QtCore.framework/Headers/qobject.h:202: note:
> candidates are: static bool QObject::connect(const QObject*, const
> char*, const QObject*, const char*, Qt::ConnectionType)
> /Library/Frameworks/QtCore.framework/Headers/qobject.h:307: note: bool
> QObject::connect(const QObject*, const char*, const char*,
> Qt::ConnectionType) const
> make: *** [dialog.o] Error 1
> $
>
> What am I doing wrong? Do I need something more elaborate in my use of
> qmake in order to get the right dependencies into the Makefile or  
> something?
>
> Thanks!
> Eric
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest





More information about the Qt-interest-old mailing list