On Sat, Jul 31, 2010 at 9:05 AM, 1+1=2 <dbzhang...@gmail.com> wrote: > Thanks for your answer. > > when use QT4_WRAP_CPP( Generated_MOC_SRCS main.cpp ), moc_main.cxx > will be generated. > then I use #include "moc_main.cxx" instead of #include "main.moc" > > but ${Generated_MOC_SRCS} can not be added to ADD_EXECUTABLE. > otherwise moc_main.cxx will be compiled too. > You want moc_main.cxx to be compiled otherwise you will have link errors.
John _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake