← Back to team overview

dolfin team mailing list archive

linking error

 

I've eventually converted my whole solver from python to C++, however I
get the following linking error when compiling:

alessio@alessio-laptop:~/FEniCS/dolfin-stable/src/modules/elasticity-updated/demo$
make
`pkg-config --variable=compiler dolfin` `pkg-config --cflags dolfin` -c
main.cpp
`pkg-config --variable=compiler dolfin` -o dolfin-elasticity main.o
`pkg-config --cflags dolfin` `pkg-config --libs dolfin`
main.o: In function `main':
/home/alessio/FEniCS/dolfin-stable/src/modules/elasticity-updated/demo/main.cpp:74:
undefined reference to
`dolfin::ElasticityUpdatedSolver::ElasticityUpdatedSolver(char*,
dolfin::Mesh&, dolfin::MySource&, double, double, double, double, double,
dolfin::MyBC&, double, dolfin::Function&, double, double, double)'
collect2: ld returned 1 exit status
make: *** [dolfin-elasticity] Error 1

from the line:

ElasticityUpdatedSolver( i_str, mesh_list[i], f[i], E, nu, nuv, nuplast,
yld, bc[i], T, v0, rho, k, weight )

and the constructor is defined as:

ElasticityUpdatedSolver(char* tag, Mesh& mesh, MySource& f, real E, real
nu, real nuv, real nuplast, real yld, MyBC& bc, real T, Function& v0, real
rho, real k, real weight);

I don't understant what could be wrong since main.cpp compiles right
against dolfin-elasticity but the constructor is not found. Thanks for
your patience.

Regards,
Alessio