Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos Magick++未在OS X 10.8中链接_Macos_Imagemagick_Osx Mountain Lion_Graphicsmagick - Fatal编程技术网

Macos Magick++未在OS X 10.8中链接

Macos Magick++未在OS X 10.8中链接,macos,imagemagick,osx-mountain-lion,graphicsmagick,Macos,Imagemagick,Osx Mountain Lion,Graphicsmagick,当我尝试将我的应用程序与ImageMagick++链接时,出现了此错误 Undefined symbols for architecture x86_64: "Magick::Image::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from: ... 我将库添加到链接器中

当我尝试将我的应用程序与ImageMagick++链接时,出现了此错误

Undefined symbols for architecture x86_64:
"Magick::Image::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
...
我将库添加到链接器中,但它忽略了-lMagick++-Q8

我使用lipo-info来双重检查架构,它匹配x86_64。。。那还可能是什么呢

以下是完整链接器命令:

Ld /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug/libMyLib1.dylib normal x86_64
cd /Users/MyUser/Desktop/AllProject/Project1/MyLib1
setenv MACOSX_DEPLOYMENT_TARGET 10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug -L/usr/local/lib -L/opt/local/lib -L/Users/MyUser/Desktop/AllProject/Project1/MyLib1/../../../../Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug -L/usr/local/Cellar/glfw/2.7.7/lib -L/usr/local/Cellar/glew/1.9.0/lib -L/usr/local/Cellar/freetype/2.4.11/lib -L/usr/local/Cellar/imagemagick/6.8.4/lib -L/usr/local/Cellar/jpeg/8d/lib -L/usr/local/Cellar/libpng/1.5.14/lib -L/usr/local/Cellar/libtool/2.4.2/lib -F/Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug -filelist /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Intermediates/MyLib1.build/Debug/MyLib1.build/Objects-normal/x86_64/MyLib1.LinkFileList -install_name /usr/local/lib/libMyLib1.dylib -mmacosx-version-min=10.8 -stdlib=libc++ -lstdc++ -liconv -lbz2 -lz -framework OpenGL -llib_json -lSFTools -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lpostproc -lGLEW.1.9 -lGLEW -lx264 -lGLEWmx.1.9 -lGLEWmx -lglfw -lpng15 -lpng15 -lfreetype -lfreetype -lltdl -ljpeg -lltdl -lMagick++-6.Q8 -lMagickCore-6.Q8 -lMagickWand-6.Q8 -lglfw -lswresample -lswscale -single_module -compatibility_version 1 -current_version 1 -o /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug/libMyLib1.dylib

你链接的是哪一行?clang++-arch x86_64-dynamiclib-L/folder/to/libs-stdlib=libc++-lstdc++-liconv-lMagick++-6.Q8-lMagickCore-6.Q8-lMagickWand-6.Q8请提供完整的链接器命令,最好是在您的问题中。完成。。。我也得到其他链接错误。。。使用OpenMP[GOMP_xxx函数]和一些STL函数。。。也许我会为这些打开另一个帖子。。。这似乎与C++11与旧C++的混合有关。在构建中,任何libstdc++和libc++的混合都会造成麻烦。所有使用clang构建的C++[11]代码都应该设置一个环境变量:CXX=clang++-std=C++11-stdlib=libc++,或者添加CXX=clang++-std=C++11-stdlib=libc++作为参数进行配置。
Ld /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug/libMyLib1.dylib normal x86_64
cd /Users/MyUser/Desktop/AllProject/Project1/MyLib1
setenv MACOSX_DEPLOYMENT_TARGET 10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug -L/usr/local/lib -L/opt/local/lib -L/Users/MyUser/Desktop/AllProject/Project1/MyLib1/../../../../Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug -L/usr/local/Cellar/glfw/2.7.7/lib -L/usr/local/Cellar/glew/1.9.0/lib -L/usr/local/Cellar/freetype/2.4.11/lib -L/usr/local/Cellar/imagemagick/6.8.4/lib -L/usr/local/Cellar/jpeg/8d/lib -L/usr/local/Cellar/libpng/1.5.14/lib -L/usr/local/Cellar/libtool/2.4.2/lib -F/Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug -filelist /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Intermediates/MyLib1.build/Debug/MyLib1.build/Objects-normal/x86_64/MyLib1.LinkFileList -install_name /usr/local/lib/libMyLib1.dylib -mmacosx-version-min=10.8 -stdlib=libc++ -lstdc++ -liconv -lbz2 -lz -framework OpenGL -llib_json -lSFTools -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lpostproc -lGLEW.1.9 -lGLEW -lx264 -lGLEWmx.1.9 -lGLEWmx -lglfw -lpng15 -lpng15 -lfreetype -lfreetype -lltdl -ljpeg -lltdl -lMagick++-6.Q8 -lMagickCore-6.Q8 -lMagickWand-6.Q8 -lglfw -lswresample -lswscale -single_module -compatibility_version 1 -current_version 1 -o /Users/MyUser/Library/Developer/Xcode/DerivedData/MyProject-cxtelbltlfqoftfcngpqxhiczxqs/Build/Products/Debug/libMyLib1.dylib