[Dune] Problems with linking an external library
Sacconi, Andrea
a.sacconi11 at imperial.ac.uk
Tue Sep 16 11:23:55 CEST 2014
Hi Christian,
yeah, workaround is not the correct terminology, I agree.
The thing that puzzled me was that UMFPACKl, which is written in C, never gave me any problem of handling legacy C-headers.
That's why I was perplexed when I couldn't make this library be linked correctly.
Best,
Andrea
__________________________________________________________
Andrea Sacconi
PhD student, Applied Mathematics
AMMP Section, Department of Mathematics, Imperial College London,
London SW7 2AZ, UK
a.sacconi11 at imperial.ac.uk
________________________________________
From: Christian Engwer [christian.engwer at uni-muenster.de]
Sent: 16 September 2014 10:21
To: Sacconi, Andrea
Cc: Bernd Flemisch; dune at dune-project.org
Subject: Re: [Dune] Problems with linking an external library
Dear Andrea,
> extern "C"{
> #include "ldl.h"
> }
this is not a work-around, but the correct way to handle legacy
C-headers.
C++ allows many functions with the name name, but different
parameters, thus the C++ compiler automatically created new names,
wwhich include the parameters, i.e. mangled names. YOur problem was
that the lib included the plain C-names, but the program references
the mangled name.
Ciao
Christian
More information about the Dune
mailing list