Hello everyone,
I would like to ask a question about a problem I am having with
libmesh because I have little experience in using it and c ++ in
general.
After configurating and building libmesh i tried to create a small
example, by copying and modifying an existing one
(examples/miscellaneous example 11),
in a separate folder so that, i don't do anything wrong in the folder
where libmesh was successfully built. I also copied the
file Makefile form contrib/utils and fixed the paths inside it as follows:
*# Template libMesh application MakefileLIBMESH_DIR ?=
/home/flexwork/Documents/repos/libmesh# include the library options
determined by configureinclude
/home/flexwork/Documents/repos/libmesh/contrib/utils/Make.common*
When i ran make in terminal in the example's folder (in the copied
one) i get the following error:
m
*ake: /usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not foundmake:
/usr/local/bin/libmesh-config: Command not found/bin/sh: 1:
/usr/local/contrib/bin/libtool: not found/bin/sh: 1:
/usr/local/contrib/bin/libtool: not foundCompiling C++ (in optimized
mode) miscellaneous_ex11.C...c miscellaneous_ex11.C -o
miscellaneous_ex11.x86_64-pc-linux-gnu.opt.omake: c: Command not
foundmake:
[/home/flexwork/Documents/repos/libmesh/contrib/utils/Make.common:159:
miscellaneous_ex11.x86_64-pc-linux-gnu.opt.o] Error 127
(ignored)Linking example-opt...make: /usr/local/contrib/bin/libtool:
Command not foundmake: *** [Makefile:39: example-opt] Error 127*
Then i modified the following paths in make.common file in
repos/libmesh/contrib/utils
*# Where libMesh is installed.prefix :=
/home/flexwork/Documents/repos/libmesh/contribexec_prefix :=
${prefix}libmesh_install_dir := $(prefix)# the libtool to use in these
defined rules.libmesh_LIBTOOL ?=
/home/flexwork/Documents/repos/libmesh/libtool*
and when i run make in my example again i get the following error:
*Compiling C++ (in optimized mode) miscellaneous_ex11.C...g++ -DNDEBUG
-O2 -felide-constructors -funroll-loops -fstrict-aliasing
-Wdisabled-optimization -fopenmp -I/usr/local/include -pthread -c
miscellaneous_ex11.C -o
miscellaneous_ex11.x86_64-pc-linux-gnu.opt.omiscellaneous_ex11.C:38:10:
fatal error: libmesh/libmesh.h: No such file or directory 38 |
#include "libmesh/libmesh.h" |
^~~~~~~~~~~~~~~~~~~compilation terminated.make: ***
[/home/flexwork/Documents/repos/libmesh/contrib/utils/Make.common:159:
miscellaneous_ex11.x86_64-pc-linux-gnu.opt.o] Error 1*.
So clearly i have understood something wrong.
in the installation instructions i see that is better that is should try:
`libmesh-config --cxx` -o foo foo.C `libmesh-config --cxxflags
--include --ldflags --libs`
but i don't know how i should use this.
I also found a repository posted on a previous conversation:
https://github.com/CalebPhillips5/ABM_Ang
but trying to build it i came across the same problems.
I would really appreciate it if anyone could give some introductory
instructions about what i am doing wrong or post a repo of a simple
code that does something similar.
I would also like to ask how can i run libmesh in debug mode so that i
can access variables in some breakpoints
, should i change something in the makefile before running an in debug
mode an example from
* libmesh/examples *in visual studio code?
Thank you in advance.
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users