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

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to