Closed bakeDong1 closed 1 year ago
Hi,
Your linker and compile flags are all over the place.
For the linker flags, "-L" provides a path to a directory containing libraries but you are passing it a path to a static lib. Try this
export CGO_LDFLAGS="\
-Wl,-Bstatic \
-L/usr/local/lib \
-lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI \
... \
-Wl,-Bdynamic"
And I am not sure what all the other paths are to the rest of the link dependencies. Are each one of those directories containing the needed .a files? If so, you will have to also add -l<name>
for each.
As for your cflags, you don't need to pass linker -L
paths.
thanks! i will check it
os type: archlinux magick --version Version: ImageMagick 7.0.10-29 Q16 x86_64 2022-12-12 https://imagemagick.org Copyright: © 1999-2020 ImageMagick Studio LLC License: https://imagemagick.org/script/license.php Features: Cipher DPC HDRI OpenMP(4.5) Delegates (built-in): bzlib fftw fontconfig freetype gvc heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png raqm tiff webp x xml zlib
I was got error
gopkg.in/gographics/imagick.v3/imagick /usr/bin/ld: $WORK/b001/_x002.o: in function
_cgo_83eb6e58db04_Cfunc_GetAffineMatrix': affine_matrix.cgo2.c:(.text+0x55): undefined reference toGetAffineMatrix' /usr/bin/ld: $WORK/b001/_x012.o: in function
_cgo_83eb6e58db04_Cfunc_ConvertHSLToRGB': conversions.cgo2.c:(.text+0x8c): undefined reference toConvertHSLToRGB' /usr/bin/ld: $WORK/b001/_x012.o: in function
_cgo_83eb6e58db04_Cfunc_ConvertRGBToHSL': conversions.cgo2.c:(.text+0xe9): undefined reference toConvertRGBToHSL' /usr/bin/ld: $WORK/b001/_x017.o: in function
_cgo_83eb6e58db04_Cfunc_AcquireDrawInfo': draw_info.cgo2.c:(.text+0x54): undefined reference toAcquireDrawInfo' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_ClearDrawingWand': drawing_wand.cgo2.c:(.text+0x55): undefined reference toClearDrawingWand' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_CloneDrawingWand': drawing_wand.cgo2.c:(.text+0x84): undefined reference toCloneDrawingWand' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_DestroyDrawingWand': drawing_wand.cgo2.c:(.text+0xd0): undefined reference toDestroyDrawingWand' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_DrawAffine': drawing_wand.cgo2.c:(.text+0x11e): undefined reference toDrawAffine' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_DrawAlpha': drawing_wand.cgo2.c:(.text+0x167): undefined reference toDrawAlpha' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_DrawAnnotation': drawing_wand.cgo2.c:(.text+0x1b2): undefined reference toDrawAnnotation' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_DrawArc': drawing_wand.cgo2.c:(.text+0x226): undefined reference toDrawArc' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_DrawBezier': drawing_wand.cgo2.c:(.text+0x25f): undefined reference toDrawBezier' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_DrawCircle': drawing_wand.cgo2.c:(.text+0x2b9): undefined reference toDrawCircle' /usr/bin/ld: $WORK/b001/_x018.o: in function
_cgo_83eb6e58db04_Cfunc_DrawColor': drawing_wand.cgo2.c:(.text+0x302): undefined reference toDrawColor'