Trouble linking Trilinos shared libraries
Hello Yade community,
I am trying to incorporate some tools from the Trilinos tool box into yade, but I am running into an issue with linking shared libraries. If you have any experience linking shared libraries with yade (or other software), I would greatly appreciate some advice here.
The process follows:
-Compile Trilinos as shared libraries
-Add a "FindTrilinos.
-Compile Yade (successfully)
-Run a test with the new yade installation and I receive the following error:
Traceback (most recent call last):
File "/home/
import yade
File "/home/
import boot
ImportError: libteuchoscomm.
_______
But libteachoscomm.
/usr/local/
I believe this directory is linked using the following (selected) commands in FindTrilinos.cmake:
SET(TRILINOS_
FIND_LIBRARY(
IF(TEUCHOS_
SET(TRILINOS_
SET(TRILINOS_
SET(HAVE_TEUCHOS YES)
ENDIF(TEUCHOS_
and then in my CMakeLists.txt:
IF(ENABLE_TRILINOS)
FIND_
IF (TRILINOS_FOUND)
INCLUDE_
LINK_
SET(
SET(LINKLIBS "${LINKLIBS}
SET(
MESSAGE("Adding Trilinos")
ELSE(
MESSAGE(STATUS "TRILINOS NOT found")
SET(
SET(
ENDIF(
ELSE(ENABLE_
SET(DISABLED_
ENDIF(ENABLE_
_______
The cmake step is successful, and so is the following make and installation of yade.
I am almost certain my problem lies in the CMakeList.txt file. I am linking here as if these are static libraries? But I noticed other shared libraries are linked slightly differently? Notice I am not very familiar with why or if we need to link static vs shared libraries differently. I have tried to link these as shared libraries with:
ADD_
TARGET_
Instead of SET(LINKLIBS...) but cmake cries about yade not being an executable.
All help appreciated,
Robert
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Anton Gladky
- Solved:
- Last query:
- Last reply: