Why cc cannot find lgomp while gcc can

旧街凉风 提交于 2019-12-25 05:25:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!