Trilinos: Anasazi: getting compilation undefined reference to symbol error upon compiling one of the example

Created on 21 Sep 2019  路  4Comments  路  Source: trilinos/Trilinos

Question

@trilinos/anasazi

I am trying to compile Trilinos example of Anasazi package with epetra :

and getting error like
/usr/bin/ld: /tmp/cctjIEYI.o: undefined reference to symbol '_ZN7Teuchos11TimeMonitorD1Ev'
//home/user/share/trilinos/lib/libteuchoscomm.so.12: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

can anyone help?

Anasazi question

All 4 comments

Please post your build command so that someone can help you with this issue.

@amklinv I could solve the issue by providing all the dynamic library names of teuchos and anasazi as the parameter with comiplation command...

mpicc -o lesson anasazi.cpp -I /home/user/share/trilinos/include -L /home/user/trilinos/lib -lepetra -lstdc++ -lanasazi -lteuchoscomm -lteuchoscore -lteuchoskokkoscomm -lteuchoskokkoscompat -lteuchosnumerics -lteuchosparameterlist -lgaleri-epetra -lteuchosremainder -lanasaziepetra -lanasazitpetra -lModeLaplace

previously i was providing only the libepetra library reference in compilation command...

Thank you so much for your response @amklinv

@sspaarkk When you build your application using Trilinos, _never_ try to list the libraries manually. Either use CMake FIND_PACKAGE(Trilinos), or use the variables in the Makefile.export.* files.

Hi @mhoemmen ,
Thank you for your feedback Sir.
I will definitely go for the CMake Procedure.
As I am new to Trilinos and CMake .. I am trying to get familiar with the basic things first.

Thanks Again.
will look forward to get more help from your side Sir @mhoemmen.

Was this page helpful?
0 / 5 - 0 ratings