<div dir="ltr">It is the moc stuff that&#39;s causing the problem. After used qmake to generate moc_*.cpp files, I was able to use cmake to compile the code. But I still have no idea on how to use cmake to compile the code without using qmake to generate the moc files first.<div>
<br></div><div>The change to my CMakeLists.txt file I made is:</div><div><div>SET(QT_WRAP_CPP TRUE)</div></div><div><br></div><div>thank you,</div><div>Linge<br><br><div class="gmail_quote">On Fri, Sep 26, 2008 at 5:40 PM, Bill Hoffman <span dir="ltr">&lt;<a href="mailto:bill.hoffman@kitware.com">bill.hoffman@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&nbsp;&quot;Window::staticMetaObject&quot;, referenced from:<br>
 &nbsp; &nbsp; __ZN6Window16staticMetaObjectE$non_lazy_ptr in window.o<br>
&nbsp;&quot;vtable for GLWidget&quot;, referenced from:<br>
 &nbsp; &nbsp; __ZTV8GLWidget$non_lazy_ptr in glwidget.o<br>
ld: symbol(s) not found<br>
collect2: ld returned 1 exit status<br>
make[2]: *** [exe] Error 1<br>
make[1]: *** [CMakeFiles/exe.dir/all] Error 2<br>
make: *** [all] Error 2<br>
<br>
</blockquote></blockquote>
<br></div>
That looks like it might be qt slots. &nbsp;You might be missing some moc stuff in your cmake files. &nbsp;See QT4_WRAP_CPP in FindQt4.cmake.<br><font color="#888888">
<br>
<br>
-Bill</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div></div>