Hi all,

I am learning Step-8 in the tutorial. I want to use the library "Armadillo" 
(which is a library for scientific computing and linear algebra) together 
with dealii in step-8.cc.
To compile a cpp file that only depends on the Armadillo library, one needs 
to excute the following commends at the commend line : "g++ example.cpp -o 
example -O2 -larmadillo"
So I replace "mylib" in dealii documentation about modifying cmakelist.txt 
with "armadillo", and modify the CMakeList.txt file as the following

_____________________________________________________________________
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)

FIND_PACKAGE(deal.II 8.5.0 REQUIRED
  HINTS ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
  )
DEAL_II_INITIALIZE_CACHED_VARIABLES()

PROJECT(myproject)

ADD_LIBRARY(armadillo)
DEAL_II_SETUP_TARGET(armadillo)

ADD_EXECUTABLE(mycode step-8.cc)
DEAL_II_SETUP_TARGET(mycode)

TARGET_LINK_LIBRARIES(mycode armadillo)
_____________________________________________________________________

And I got the the following error:

-- Using the deal.II-8.5.1 installation found at 
/home/liu/deal.ii-candi/deal.II-v8.5.1
-- Include macro 
/home/liu/deal.ii-candi/deal.II-v8.5.1/share/deal.II/macros/macro_deal_ii_initialize_cached_variables.cmake
-- Include macro 
/home/liu/deal.ii-candi/deal.II-v8.5.1/share/deal.II/macros/macro_deal_ii_setup_target.cmake
-- Include macro 
/home/liu/deal.ii-candi/deal.II-v8.5.1/share/deal.II/macros/macro_deal_ii_query_git_information.cmake
-- Include macro 
/home/liu/deal.ii-candi/deal.II-v8.5.1/share/deal.II/macros/macro_deal_ii_pickup_tests.cmake
-- Include macro 
/home/liu/deal.ii-candi/deal.II-v8.5.1/share/deal.II/macros/macro_deal_ii_add_test.cmake
-- Include macro 
/home/liu/deal.ii-candi/deal.II-v8.5.1/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake
You have called ADD_LIBRARY for library armadillo without any source files. 
This typically indicates a problem with your CMakeLists.txt file
-- Configuring done
CMake Error: Cannot determine link language for target "armadillo".
CMake Error: CMake can not determine linker language for target: armadillo
-- Generating done
-- Build files have been written to: /home/liu/P/homogenization





Can anyone help me about this issue about add library?
Many thanks in advance!
 

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to