[CMake] Phonon with an older version of CMake

Alexander Solis alex.solis at telcentris.com
Tue Oct 28 17:26:03 EDT 2008


Sorry about that, you were right, I was missing the link to phonon.

It solved the problem for CMake 2.6 but not for CMake 2.4.

Here is the make VERBOSE=1 using cmake 2.4:

/usr/local/bin/cmake -H/Users/telcentrisholdingsa/Desktop/video_cmake - 
B/Users/telcentrisholdingsa/Desktop/video_cmake --check-build-system  
CMakeFiles/Makefile.cmake 0
Clearing dependencies in "CMakeFiles/video.dir/depend.make".
Clearing dependencies in "CMakeFiles/video.dir/depend.internal".
/usr/local/bin/cmake -E cmake_progress_start /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 4
make -f CMakeFiles/Makefile2 all
make -f CMakeFiles/video.dir/build.make CMakeFiles/video.dir/depend
/usr/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 4
[ 25%] Generating moc_mainwindow.cxx
/usr/local/Trolltech/Qt-4.4.0/bin/moc -I /usr/local/Trolltech/Qt-4.4.0/ 
include -I /usr/local/Trolltech/Qt-4.4.0/include/QtGui -I /usr/local/ 
Trolltech/Qt-4.4.0/include/QtCore -o /Users/telcentrisholdingsa/ 
Desktop/video_cmake/moc_mainwindow.cxx /Users/telcentrisholdingsa/ 
Desktop/video_cmake/mainwindow.h
Scanning dependencies of target video
cd /Users/telcentrisholdingsa/Desktop/video_cmake && /usr/local/bin/ 
cmake -E cmake_depends "Unix Makefiles" /Users/telcentrisholdingsa/ 
Desktop/video_cmake /Users/telcentrisholdingsa/Desktop/video_cmake / 
Users/telcentrisholdingsa/Desktop/video_cmake /Users/ 
telcentrisholdingsa/Desktop/video_cmake /Users/telcentrisholdingsa/ 
Desktop/video_cmake/CMakeFiles/video.dir/DependInfo.cmake
make -f CMakeFiles/video.dir/build.make CMakeFiles/video.dir/build
/usr/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 1
[ 50%] Building CXX object CMakeFiles/video.dir/mainwindow.o
/usr/bin/c++   -I/usr/local/Trolltech/Qt-4.4.0/include -I/usr/local/ 
Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/ 
include/QtCore   -F/usr/local/Trolltech/Qt-4.4.0/lib -L/usr/local/ 
Trolltech/Qt-4.4.0/lib -DQT_SHARED -DQT_GUI_LIB -DQT_CORE_LIB - 
DQT_NO_DEBUG -F/usr/local/Trolltech/Qt-4.4.0/lib  -o CMakeFiles/ 
video.dir/mainwindow.o -c /Users/telcentrisholdingsa/Desktop/ 
video_cmake/mainwindow.cpp
/usr/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 2
[ 75%] Building CXX object CMakeFiles/video.dir/main.o
/usr/bin/c++   -I/usr/local/Trolltech/Qt-4.4.0/include -I/usr/local/ 
Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/ 
include/QtCore   -F/usr/local/Trolltech/Qt-4.4.0/lib -L/usr/local/ 
Trolltech/Qt-4.4.0/lib -DQT_SHARED -DQT_GUI_LIB -DQT_CORE_LIB - 
DQT_NO_DEBUG -F/usr/local/Trolltech/Qt-4.4.0/lib  -o CMakeFiles/ 
video.dir/main.o -c /Users/telcentrisholdingsa/Desktop/video_cmake/ 
main.cpp
/usr/local/bin/cmake -E cmake_progress_report /Users/ 
telcentrisholdingsa/Desktop/video_cmake/CMakeFiles 3
[100%] Building CXX object CMakeFiles/video.dir/moc_mainwindow.o
/usr/bin/c++   -I/usr/local/Trolltech/Qt-4.4.0/include -I/usr/local/ 
Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/ 
include/QtCore   -F/usr/local/Trolltech/Qt-4.4.0/lib -L/usr/local/ 
Trolltech/Qt-4.4.0/lib -DQT_SHARED -DQT_GUI_LIB -DQT_CORE_LIB - 
DQT_NO_DEBUG -F/usr/local/Trolltech/Qt-4.4.0/lib  -o CMakeFiles/ 
video.dir/moc_mainwindow.o -c /Users/telcentrisholdingsa/Desktop/ 
video_cmake/moc_mainwindow.cxx
Linking CXX executable video
/usr/local/bin/cmake -P CMakeFiles/video.dir/cmake_clean_target.cmake
/usr/bin/c++     -headerpad_max_install_names -fPIC "CMakeFiles/ 
video.dir/mainwindow.o" "CMakeFiles/video.dir/main.o" "CMakeFiles/ 
video.dir/moc_mainwindow.o"   -o video  -F/usr/local/Trolltech/ 
Qt-4.4.0/lib -framework QtGui -framework Carbon -framework QuickTime - 
framework QtCore -lz -framework ApplicationServices
Undefined symbols:
   "Phonon::MediaObject::setCurrentSource(Phonon::MediaSource  
const&)", referenced from:
       MainWindow::MainWindow()in mainwindow.o
   "Phonon::AudioOutput::AudioOutput(Phonon::Category, QObject*)",  
referenced from:
       MainWindow::MainWindow()in mainwindow.o
   "Phonon::VideoWidget::VideoWidget(QWidget*)", referenced from:
       MainWindow::MainWindow()in mainwindow.o
   "Phonon::MediaObject::play()", referenced from:
       MainWindow::MainWindow()in mainwindow.o
   "Phonon::MediaSource::MediaSource(QString const&)", referenced from:
       MainWindow::MainWindow()in mainwindow.o
   "Phonon::MediaObject::MediaObject(QObject*)", referenced from:
       MainWindow::MainWindow()in mainwindow.o
   "Phonon::Path::~Path()", referenced from:
       MainWindow::MainWindow()in mainwindow.o
       MainWindow::MainWindow()in mainwindow.o
   "Phonon::createPath(Phonon::MediaNode*, Phonon::MediaNode*)",  
referenced from:
       MainWindow::MainWindow()in mainwindow.o
       MainWindow::MainWindow()in mainwindow.o
   "Phonon::MediaObject::setTickInterval(int)", referenced from:
       MainWindow::MainWindow()in mainwindow.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [video] Error 1
make[1]: *** [CMakeFiles/video.dir/all] Error 2
make: *** [all] Error 2

On Oct 28, 2008, at 3:08 PM, clinton at elemtech.com wrote:

>
> It don't see you linking with phonon.
> Its typically done like this (using phonon support in CMake 2.6)
>
> find_package(Qt4)
> set(QT_USE_PHONON 1)
> include(${QT_USE_FILE})
> ....
> add_executable(...)
> target_link_libraries(... ${QT_LIBRARIES})
>
> Clint
>>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081028/16ea81c3/attachment.htm>


More information about the CMake mailing list