In the dev version of dolfin there seems to be a problem with include/dolfin/assemble.h. It defines both implementation and prototype which causes a collision in the namespace, for example take a foobar library that just imports dolfin.h twice:
ater...@localhost$ cat foo.cpp #include <dolfin.h> ater...@localhost$ cat bar.cpp #include <dolfin.h> ater...@localhost$ `pkg-config --variable=compiler dolfin` -o foo.os -c -fPIC `pkg-config --cflags dolfin` foo.cpp ater...@localhost$ `pkg-config --variable=compiler dolfin` -o bar.os -c -fPIC `pkg-config --cflags dolfin` bar.cpp ater...@localhost$ `pkg-config --variable=compiler dolfin` -o foobar.dylib -dynamiclib `pkg-config --cflags --libs dolfin` foo.os bar.os ld: multiple definitions of symbol __ZN6dolfin15assemble_systemERNS_13GenericMatrixERNS_13GenericVectorERKNS_4FormES6_RKNS_11DirichletBCEb foo.os definition of __ZN6dolfin15assemble_systemERNS_13GenericMatrixERNS_13GenericVectorERKNS_4FormES6_RKNS_11DirichletBCEb in section (__TEXT,__text) bar.os definition of __ZN6dolfin15assemble_systemERNS_13GenericMatrixERNS_13GenericVectorERKNS_4FormES6_RKNS_11DirichletBCEb in section (__TEXT,__text) ... lots of functions multiply defined from assemble.h Removing assemble.h from the top-level include works well, for my needs I just link it in manually. To make the library a bit nicer to use I would suggest splitting the implementation from the prototypes. -- Andy _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
