MAC Undefined symbols for architecture x86_64 cv::imwrite 因为homebrew安装opencv时用的是clang,而CLion中使用的是gcc编译器。 将clion中的编译器改回默认的clang就行了。