I was able to compile the code with no debug flags, however, when I set them on, I get this linking error:
CMakeFiles/vector_cmake.dir/vector_fe_ex1.C.o: In function `libMesh::ReferenceCounter::increment_constructor_count(std::string const&)': /g/g92/miguel/code/libmesh_2D/include/libmesh/reference_counter.h:166: undefined reference to `libMesh::ReferenceCounter::_counts’ which I don’t understand because Reference::_counts is defined in reference_counter.h. The CMakeListst.txt I am using is this: http://paste.ofcode.org/ccTszpQcpPSahs6NJFTSZK which needs this script to obtain the dependencies from libmesh: http://paste.ofcode.org/fS6ieQPJgxcHg382cTDrbA I know you guys don’t use CMake, but I would really appreciate any tip here. I think that it is not finding the debug version of the library? Could this be the issue? Thanks Miguel From: John Peterson <jwpeter...@gmail.com<mailto:jwpeter...@gmail.com>> Date: Friday, April 1, 2016 at 11:19 AM To: Miguel Salazar <salazardet...@llnl.gov<mailto:salazardet...@llnl.gov>> Cc: "libmesh-users@lists.sourceforge.net<mailto:libmesh-users@lists.sourceforge.net>" <libmesh-users@lists.sourceforge.net<mailto:libmesh-users@lists.sourceforge.net>> Subject: Re: [Libmesh-users] Linking application to libMesh On Fri, Apr 1, 2016 at 12:16 PM, Salazar De Troya, Miguel <salazardet...@llnl.gov<mailto:salazardet...@llnl.gov>> wrote: That’s exactly what I have been doing, and I can compile the application with CMake, however, I was told that linking to all the libraries resulting from $LIBMESH_DIR/bin/libmesh-config —libs might be unnecessary and slow, as I explained below. I suppose that I should find a way within CMake to do what libtool does in the linking so not all libraries are used. It's not unnecessary, those libraries are in $LIBMESH_LIBS because they *are* necessary. As for slow, I suppose it could make a difference with static linking, but I don't think you should see much slowness while using dynamic libs... these are all linker details though, and you shouldn't try to control them at the user level. -- John ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users