调试模式下:系统库和连接目录下的库同名产生的BUG

调试时报错如下:

16:37:16: Debugging /Users/abc/work/woterm/woterm/bin/woterm.app/Contents/MacOS/woterm ...
dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
  Expected in: /Users/abc/work/woterm/woterm/third/jpeg/unix/lib/libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
16:39:24: Debugging of /Users/abc/work/woterm/woterm/bin/woterm.app/Contents/MacOS/woterm has finished.

当前项目仅使用到该静态库,而该动态库,是没有使用到的,在调试阶段,因为系统图像库也依赖到该文件,从而导致加载了最新版本。但因为函数或参数缺失,直接报错。

解决办法是编译第三方库时,主动删除多余的库文件,避免一些奇怪问题。