William A. Hoffman 写道:
At 07:02 AM 8/7/2006, Fu Limin wrote:
Hi,

I am trying to use cmake as the building system for my project which may
use many different libraries. I only have one day experience with it
:-), so far everything works fine except that a sub-project using Qt4
can not be built. The problem is when I use INCLUDE(FindQt4), the
following errors always came out:

CMake Error: Error in cmake code at
6:39:
CONFIGURE_FILE Problem configuring file
Current CMake stack:
/home/fulimin/winux/projects/DaoVM/cmake/tools/DaoConsole_QT4/CMakeLists.txt;/usr/local/cmake/share/CMake/Modules/FindQt4.cmake
CMake Error: Error in cmake code at
/usr/local/cmake/share/CMake/Modules/FindQt4.cmake:333:
A command failed during the invocation of macro "CHECK_SYMBOL_EXISTS".
CMake Error: Error in cmake code at
/usr/local/cmake/share/CMake/Modules/FindQt4.cmake:333:
CHECK_SYMBOL_EXISTS unknown error.
Current CMake stack:
/home/fulimin/winux/projects/DaoVM/cmake/tools/DaoConsole_QT4/CMakeLists.txt;/usr/local/cmake/share/CMake/Modules/FindQt4.cmake
...

The same problem also came out if try to build it as a stand alone
project. But if I copy a CMakeCache.txt file from a package (VTK) I
downloaded on internet to my project, then it works! Can somebody give
me some hints to solve this problem?

By the way, how can I include qt resource file *.qrc in my CMakeLists.txt?

You need to look at CMakeError.log and figure out why the try compile is 
failing.

-Bill

Thank you for the hint!
From the log file, I find out the problem is due to an error in determing pthread library, it used -lpthreads flag to link the testing code. I don't understand why it does not use -lpthread without s. I guess this testing is invoked by the macro FIND_PACKAGE(Threads) in the FindQt4.cmake. Is there a work around :-) for this?

Limin
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to