我刚刚安装了 trilinos 11.0.3,现在我正在尝试使用 cmake 编译我的第一个应用程序。
我要编译的文件在这里 http://code.google.com/p/trilinos/wiki/EpetraSimpleVector
cmake
尽管对于每个 trilinos 软件包,我都收到以下警告(以防万一),但第一个命令似乎有效:
CMake Warning (dev) at /home/giorgos/Documents/TRILINOS/lib/cmake/Trilinos/
TrilinosTargets.cmake:208 (ADD_LIBRARY):
ADD_LIBRARY called with SHARED option but the target platform does not
support dynamic linking. Building a STATIC library instead. This may lead
to problems.
除此之外,似乎 trilinos 的位置包含和库已正确找到
但是,该make
命令会生成类似错误的列表,例如:
/home/giorgos/Documents/mpi_tests/trilinos_test/test1/src/teuchos_test.cpp:11:
undefined reference to `Epetra_SerialComm::Epetra_SerialComm()'
/home/giorgos/Documents/mpi_tests/trilinos_test/test1/src/teuchos_test.cpp:16:
undefined reference to `Epetra_Map::Epetra_Map(int, int, Epetra_Comm const&)'
/home/giorgos/Documents/mpi_tests/trilinos_test/test1/src/teuchos_test.cpp:19:
undefined reference to `Epetra_Vector::Epetra_Vector(Epetra_BlockMap const&, bool)'
/home/giorgos/Documents/mpi_tests/trilinos_test/test1/src/teuchos_test.cpp:20:
undefined reference to `Epetra_Vector::Epetra_Vector(Epetra_BlockMap const&, bool)'
知道这里发生了什么吗?
(我将源文件命名为 teuchos_test.cpp 因为首先我尝试从 teuchos 包中编译一些代码,但是我收到了与上面类似的错误)
谢谢
乔戈斯