FMM3D icon indicating copy to clipboard operation
FMM3D copied to clipboard

Windows matlab compile issue

Open AsIlll223 opened this issue 1 year ago • 1 comments

Dear all,

when I compile the fmm3d to the mex file in matlab, here is an issue:

I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x3614): undefined reference to hndiv_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x5d61): undefined reference to hfmm3d_ndiv__' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x694b): undefined reference to h3ddirectcp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x73bb): undefined reference to h3ddirectdp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x7fbc): undefined reference to h3ddirectcdp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x8b62): undefined reference to h3ddirectcg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x97a2): undefined reference to h3ddirectdg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xa5c3): undefined reference to h3ddirectcdg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xaee4): undefined reference to lndiv_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xd1ed): undefined reference to lfmm3d_ndiv__' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xdbd4): undefined reference to l3ddirectcp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xe484): undefined reference to l3ddirectdp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xee61): undefined reference to l3ddirectcdp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xf89c): undefined reference to l3ddirectcg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x1030c): undefined reference to l3ddirectdg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x10ebe): undefined reference to l3ddirectcdg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x11a69): undefined reference to l3ddirectch_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x12639): undefined reference to l3ddirectdh_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x13395): undefined reference to l3ddirectcdh_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x14fc4): undefined reference to emfmm3d_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x16b1f): undefined reference to em3ddirect_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x184e7): undefined reference to stfmm3d_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x19239): undefined reference to st3ddirectstokg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x1a1e6): undefined reference to st3ddirectstokstrsg_' collect2.exe: error: ld returned 1 exit status

image image

Could anyone help me ?

AsIlll223 avatar Jan 29 '24 07:01 AsIlll223

@AsIlll223 I guess you modified the makefile.windows for powershell? makefile.windows has not been updated for a while. And it seems that you also replaced https://github.com/flatironinstitute/FMM3D/blob/31173b219a6f3a730f1454e7edfaeeb47f4d675c/makefile.windows#L75-L94 with https://github.com/flatironinstitute/FMM3D/blob/31173b219a6f3a730f1454e7edfaeeb47f4d675c/makefile#L94-L122 ? And OBJS = $(COMOBJS) $(HOBJS) $(LOBJS) $(STOBJS) $(EMOBJS) should be used in your makefile, right?

Could you try clean all the src/Common/*.o, src/Helmholtz/*.o, src/Laplace/*.o, src/Maxwell/*.o, Stokes/*.o and the libfmm3d.a. And rerun the make matlab. Weirdly it seems using the libfmm3d.a missing the symbols.

lu1and10 avatar Jan 29 '24 14:01 lu1and10