问题
on Mac OS X 10.7
I run this command on this file http://www.imagemagick.org/source/wand.c as they said here http://www.imagemagick.org/script/magick-wand.php
cc -o wand `pkg-config --cflags --libs MagickWand` wand.c
An error occurred:
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
But gcc works fine:
gcc -o wand `pkg-config --cflags --libs MagickWand` wand.c
Why was that? I want to know what different between gcc and cc on this.
FYI:
I installed ImageMagick follow this http://www.imagemagick.org/script/install-source.php.
The only command I didn't follow is sudo ldconfig /usr/local/lib
since my Mac have no ldconfig
here.
来源:https://stackoverflow.com/questions/12795742/why-cc-cannot-find-lgomp-while-gcc-can