Bill Greene
unread,Apr 19, 2017, 11:18:06 AM4/19/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dea...@googlegroups.com
I am continuing to try to use DEAL with Visual Studio.
I have had some success but ran into a problem when I tried to include
the bundled
umfpack via the Cmake directive
-D DEAL_II_WITH_UMFPACK=ON
Deal II seemed to build without problems but when I tried to build
example step-56,
I got unsatisfied externals: amd_malloc, amd_free, etc.
After some investigation it appears that those functions are being defined as:
nm -g amd_global.obj
0000000000000000 B ?amd_calloc@@3P6APEAX_K0@ZEA
0000000000000008 B ?amd_free@@3P6AXPEAX@ZEA
0000000000000018 B ?amd_malloc@@3P6APEAX_K@ZEA
0000000000000000 D ?amd_printf@@3P6AHPEBDZZEA
0000000000000010 B ?amd_realloc@@3P6APEAXPEAX_K@ZEA
but referenced as, for example:
$ nm -g umf_malloc.obj
0000000000000000 T ?umf_i_malloc@@YAPEAXH_K@Z
U amd_malloc
I don't know if this is a fix or simply a work-around, but I added an
extern"C" to the definitions
of those functions in amd_global.cc as follows:
#ifdef __cplusplus
extern "C" {
#endif
/* standard ANSI-C: */
void *(*amd_malloc) (size_t) = malloc ;
void (*amd_free) (void *) = free ;
void *(*amd_realloc) (void *, size_t) = realloc ;
void *(*amd_calloc) (size_t, size_t) = calloc ;
#ifdef __cplusplus
}
Seems to have solved the problem for me.
Bill