Thank you, I got it

Simone

On 07/12/2016 16:13, Roy Stogner wrote:
>
> On Wed, 7 Dec 2016, simone wrote:
>
>> The problem is that, when compiling and linking the attached package, I
>> get the following error:
>>
>> undefined reference to `libMesh::Edge2::connectivity(unsigned int,
>> libMesh::IOPackage, std::vector<unsigned int, std::allocator<unsigned
>> int> >&) const'
>> collect2: error: ld returned 1 exit status
>>
>> the problem does not occur replacing the -lmesh_dbg with -lmesh_opt
>> linking option; this is actually preventing me to use libmesh in debug
>> mode.
>>
>> Any clue?
>
> libmesh_dbg.so is by default compiled using GNU libstdc++ debugging
> flags when you're using GCC:
>
> https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_using.html#debug_mode.using.mode
>
>
> "Note that this flag changes the sizes and behavior of standard class
> templates such as std::vector, and therefore you can only link code
> compiled with debug mode and code compiled without debug mode if no
> instantiation of a container is passed between the two translation
> units."
>
> In other words, there's no reference defined in libmesh_dbg.so to
> anything like some_libmesh_function(std::vector); in each case there
> is instead a corresponding reference defined to
> some_libmesh_function(__gnu_debug::vector).  If you don't compile
> every part of your program with the same dbg flags, then at some point
> your code (or our inlined code) wants to call the std::vector
> functions, the library only defines the __gnu_debug::vector functions,
> and the latter aren't recognized as (or usable as) replacements for
> the former.
>
> Compile your application code with the same flags (e.g. by evaluating
> $(libmesh_config --cppflags --cxxflags) and using the result in your
> build system) and you should be fine.  If this isn't possible, the
> best you can do is to use devel mode or to disable the ABI-changing
> flags with "configure --disable-glibcxx-debugging"
> ---
> Roy


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to