我有一些代码在 Linux 和 Windows 中编译得很好,但在 Mac 中无法报告跨不同对象文件的重复符号错误。
Mac 中的编译器或链接器有什么不同,这可能是错误的根源?
这可能与模板和内联函数的使用有关吗?
我想选择部分代码,但我不知道是什么导致了错误,以便提取它的相关部分或构建 MWE。
此外,头球确实有后卫。
在 Mac 上我使用 MacPorts 的 gcc47,在 linux 上我使用 gcc 4.6,以防万一。
更新:
130 个重复符号之一的示例:
Linking CXX executable train
duplicate symbol maxflow::Graph<int, int, int>::add_tweights(int, int, int) in:
CMakeFiles/train.dir/svm_struct_api.o
CMakeFiles/train.dir/inference.o
ìnference.cpp
以及Linux 中编译行的摘录svm_struct_api.c
[ 6%] Building CXX object CMakeFiles/predict.dir/svm_struct_api.o
g++ -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -ftemplate-depth-50 -Wall -Wno-deprecated -msse2 -ftemplate-depth-50 -Wall -Wno-deprecated -msse2 -D USE_REVERSE_INDEXING -D USE_LIBDAI -D USE_MAXFLOW -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -O3 -I/home/monso/code/ITK3/InsightToolkit-3.20.1/Code/Review -I/home/monso/code/ITK3/InsightToolkit-3.20.1/Utilities/gdcm/src -I/home/monso/code/ITK3/InsightToolkit-3.20.1/build/Utilities/gdcm [...] -I/home/monso/code/ITK3/InsightToolkit-3.20.1/build -I/home/monso/code/opencv/build -I/home/monso/code/opencv/include -I/home/monso/code/opencv/include/opencv -I/home/monso/code/opencv/modules/core/include -I/home/monso/code/opencv/modules/imgproc/include -I/home/monso/code/opencv/modules/flann/include -I/home/monso/code/opencv/modules/highgui/include -I/home/monso/code/opencv/modules/features2d/include -I/home/monso/code/opencv/modules/calib3d/include -I/home/monso/code/opencv/modules/ml/include -I/home/monso/code/opencv/modules/video/include -I/home/monso/code/opencv/modules/objdetect/include -I/home/monso/code/opencv/modules/contrib/include -I/home/monso/code/opencv/modules/nonfree/include -I/home/monso/code/opencv/modules/photo/include -I/home/monso/code/opencv/modules/legacy/include -I/home/monso/code/opencv/modules/gpu/include -I/home/monso/code/opencv/modules/softcascade/include -I/home/monso/code/opencv/modules/stitching/include -I/home/monso/code/opencv/modules/ts/include -I/home/monso/code/opencv/modules/videostab/include -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/graphCuts -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../core -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../shaders -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/slic -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/libsvm-3.0 -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/rays3d -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/libDAI024/include -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/mpir -o CMakeFiles/predict.dir/svm_struct_api.o -c /home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/svm_struct_api.c
[ 13%] Building CXX object CMakeFiles/predict.dir/inference.o
g++ -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -ftemplate-depth-50 -Wall -Wno-deprecated -msse2 -ftemplate-depth-50 -Wall -Wno-deprecated -msse2 -D USE_REVERSE_INDEXING -D USE_LIBDAI -D USE_MAXFLOW -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -O3 -I/home/monso/code/ITK3/InsightToolkit-3.20.1/Code/Review [...] -I/home/monso/code/ITK3/InsightToolkit-3.20.1/build -I/home/monso/code/opencv/build -I/home/monso/code/opencv/include -I/home/monso/code/opencv/include/opencv -I/home/monso/code/opencv/modules/core/include -I/home/monso/code/opencv/modules/imgproc/include -I/home/monso/code/opencv/modules/flann/include -I/home/monso/code/opencv/modules/highgui/include -I/home/monso/code/opencv/modules/features2d/include -I/home/monso/code/opencv/modules/calib3d/include -I/home/monso/code/opencv/modules/ml/include -I/home/monso/code/opencv/modules/video/include -I/home/monso/code/opencv/modules/objdetect/include -I/home/monso/code/opencv/modules/contrib/include -I/home/monso/code/opencv/modules/nonfree/include -I/home/monso/code/opencv/modules/photo/include -I/home/monso/code/opencv/modules/legacy/include -I/home/monso/code/opencv/modules/gpu/include -I/home/monso/code/opencv/modules/softcascade/include -I/home/monso/code/opencv/modules/stitching/include -I/home/monso/code/opencv/modules/ts/include -I/home/monso/code/opencv/modules/videostab/include -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/graphCuts -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../core -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../shaders -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/slic -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/libsvm-3.0 -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/rays3d -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/libDAI024/include -I/home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/../../../lib/mpir -o CMakeFiles/predict.dir/inference.o -c /home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/inference.cpp
/usr/bin/cmake -E cmake_progress_report /home/monso/code/mito/superpixels/branches/porting/tools/ssvm/core/build/CMakeFiles 14
以及 Linux 中构建线的摘录
Linking CXX executable predict
/usr/bin/cmake -E cmake_link_script CMakeFiles/predict.dir/link.txt --verbose=1
g++ -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -ftemplate-depth-50 -Wall -Wno-deprecated -msse2 -ftemplate-depth-50 -Wall -Wno-deprecated -msse2 -D USE_REVERSE_INDEXING -D USE_LIBDAI -D USE_MAXFLOW -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -O3 CMakeFiles/predict.dir/predict.o CMakeFiles/predict.dir/svm_struct/svm_struct_common.o CMakeFiles/predict.dir/svm_struct/svm_struct_learn.o CMakeFiles/predict.dir/svm_light/svm_common.o CMakeFiles/predict.dir/svm_light/svm_hideo.o CMakeFiles/predict.dir/svm_light/svm_learn.o CMakeFiles/predict.dir/svm_struct_api.o CMakeFiles/predict.dir/svm_struct_learn_custom.o CMakeFiles/predict.dir/constraint_set.o CMakeFiles/predict.dir/label_cache.o CMakeFiles/predict.dir/inference_globals.o CMakeFiles/predict.dir/computeStats.o CMakeFiles/predict.dir/globalStats.o CMakeFiles/predict.dir/energyParam.o CMakeFiles/predict.dir/inference.o CMakeFiles/predict.dir/graphInference.o CMakeFiles/predict.dir/gi_ICM.o CMakeFiles/predict.dir/gi_max.o CMakeFiles/predict.dir/gi_martingale.o CMakeFiles/predict.dir/gi_MF.o CMakeFiles/predict.dir/gi_sampling.o CMakeFiles/predict.dir/gi_libDAI.o CMakeFiles/predict.dir/gi_maxflow.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/BOF.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/colormap.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/Config.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/Feature.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Cluster.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_ColorHistogram.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Combo.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Gaussian.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Glcm.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Histogram.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_LoadFromFile.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_OrientedHistogram.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Position.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Precomputed.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Test.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/Histogram.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/HistogramND.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/oSVM.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/PixelData.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/Slice3d.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/Slice.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/Slice_P.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/SliceData.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/StatModel.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/Supernode.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/utils.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/lib/libsvm-3.0/svm.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_3dRays.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_CannyStats.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_Filter.o CMakeFiles/predict.dir/home/monso/code/mito/superpixels/branches/porting/core/F_GradientStats.o -o predict -rdynamic -L/home/monso/code/ITK3/InsightToolkit-3.20.1/build/bin -L/home/monso/code/opencv/build/lib -L/home/monso/code/mito/superpixels/branches/porting/lib/slic/build -L/home/monso/code/mito/superpixels/branches/porting/lib/rays3d/build -L/home/monso/code/mito/superpixels/branches/porting/lib/libDAI024/build /home/monso/code/opencv/build/lib/libopencv_calib3d.so /home/monso/code/opencv/build/lib/libopencv_contrib.so /home/monso/code/opencv/build/lib/libopencv_core.so /home/monso/code/opencv/build/lib/libopencv_features2d.so /home/monso/code/opencv/build/lib/libopencv_flann.so /home/monso/code/opencv/build/lib/libopencv_gpu.so /home/monso/code/opencv/build/lib/libopencv_highgui.so /home/monso/code/opencv/build/lib/libopencv_imgproc.so /home/monso/code/opencv/build/lib/libopencv_legacy.so /home/monso/code/opencv/build/lib/libopencv_ml.so /home/monso/code/opencv/build/lib/libopencv_nonfree.so /home/monso/code/opencv/build/lib/libopencv_objdetect.so /home/monso/code/opencv/build/lib/libopencv_photo.so /home/monso/code/opencv/build/lib/libopencv_softcascade.so /home/monso/code/opencv/build/lib/libopencv_stitching.so /home/monso/code/opencv/build/lib/libopencv_ts.so /home/monso/code/opencv/build/lib/libopencv_video.so /home/monso/code/opencv/build/lib/libopencv_videostab.so /home/monso/code/mito/superpixels/branches/porting/lib/slic/build/libsupervoxel.a -lITKIO -lITKStatistics /home/monso/code/mito/superpixels/branches/porting/lib/rays3d/build/librays3d.a /home/monso/code/mito/superpixels/branches/porting/lib/libDAI024/build/libdai.a -lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litkopenjpeg -litkpng -litktiff -litkjpeg8 -lITKSpatialObject -lITKMetaIO -lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz -litkzlib -lITKCommon -litksys -litkvnl_inst -litkvnl_algo -litkvnl -litkvcl -litkv3p_lsqr -lpthread -lm -ldl -litkNetlibSlatec -litkv3p_netlib -lm -Wl,-rpath,/home/monso/code/ITK3/InsightToolkit-3.20.1/build/bin:/home/monso/code/opencv/build/lib
[...]
[ 50%] Built target predict
在 Mac 中
[ 6%] Building CXX object CMakeFiles/predict.dir/svm_struct_api.o
g++ -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -D USE_REVERSE_INDEXING -D USE_LIBDAI -D USE_MAXFLOW -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -O3 -I/Users/monso/code/InsightToolkit-3.20.1/Code/Review -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/gdcm/src -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/gdcm -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/vxl/core -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/vxl/vcl -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/vxl/v3p/netlib -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/vxl/core -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/vxl/vcl -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/vxl/v3p/netlib -I/Users/monso/code/InsightToolkit-3.20.1/Code/Numerics/Statistics -I/Users/monso/code/InsightToolkit-3.20.1/Utilities -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/itkExtHdrs -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/nifti/znzlib -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/nifti/niftilib -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/expat -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/expat -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/DICOMParser -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/DICOMParser -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/NrrdIO -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/NrrdIO -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/MetaIO -I/Users/monso/code/InsightToolkit-3.20.1/Code/SpatialObject -I/Users/monso/code/InsightToolkit-3.20.1/Code/Numerics/NeuralNetworks -I/Users/monso/code/InsightToolkit-3.20.1/Code/Numerics/FEM -I/Users/monso/code/InsightToolkit-3.20.1/Code/IO -I/Users/monso/code/InsightToolkit-3.20.1/Code/Numerics -I/Users/monso/code/InsightToolkit-3.20.1/Code/Common -I/Users/monso/code/InsightToolkit-3.20.1/Code/BasicFilters -I/Users/monso/code/InsightToolkit-3.20.1/Code/Algorithms -I/Users/monso/code/InsightToolkit-3.20.1/build -I/Users/monso/code/superpixels/branches/porting/lib/opencv/build -I/Users/monso/code/superpixels/branches/porting/lib/opencv/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/include/opencv -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/core/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/imgproc/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/flann/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/highgui/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/features2d/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/calib3d/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/ml/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/video/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/objdetect/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/contrib/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/photo/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/legacy/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/gpu/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/ocl/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/nonfree/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/stitching/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/superres/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/ts/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/videostab/include -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/graphCuts -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../core -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../shaders -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/slic -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/libsvm-3.0 -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/rays3d -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/libDAI024/include -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/mpir -I/Users/monso/code/boost_1_51_0 -o CMakeFiles/predict.dir/svm_struct_api.o -c /Users/monso/code/superpixels/branches/porting/tools/ssvm/core/svm_struct_api.c
[ 13%] Building CXX object CMakeFiles/predict.dir/inference.o
g++ -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -D USE_REVERSE_INDEXING -D USE_LIBDAI -D USE_MAXFLOW -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -O3 -I/Users/monso/code/InsightToolkit-3.20.1/Code/Review -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/gdcm/src -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/gdcm -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/vxl/core -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/vxl/vcl -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/vxl/v3p/netlib -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/vxl/core -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/vxl/vcl -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/vxl/v3p/netlib -I/Users/monso/code/InsightToolkit-3.20.1/Code/Numerics/Statistics -I/Users/monso/code/InsightToolkit-3.20.1/Utilities -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/itkExtHdrs -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/nifti/znzlib -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/nifti/niftilib -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/expat -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/expat -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/DICOMParser -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/DICOMParser -I/Users/monso/code/InsightToolkit-3.20.1/build/Utilities/NrrdIO -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/NrrdIO -I/Users/monso/code/InsightToolkit-3.20.1/Utilities/MetaIO -I/Users/monso/code/InsightToolkit-3.20.1/Code/SpatialObject -I/Users/monso/code/InsightToolkit-3.20.1/Code/Numerics/NeuralNetworks -I/Users/monso/code/InsightToolkit-3.20.1/Code/Numerics/FEM -I/Users/monso/code/InsightToolkit-3.20.1/Code/IO -I/Users/monso/code/InsightToolkit-3.20.1/Code/Numerics -I/Users/monso/code/InsightToolkit-3.20.1/Code/Common -I/Users/monso/code/InsightToolkit-3.20.1/Code/BasicFilters -I/Users/monso/code/InsightToolkit-3.20.1/Code/Algorithms -I/Users/monso/code/InsightToolkit-3.20.1/build -I/Users/monso/code/superpixels/branches/porting/lib/opencv/build -I/Users/monso/code/superpixels/branches/porting/lib/opencv/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/include/opencv -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/core/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/imgproc/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/flann/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/highgui/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/features2d/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/calib3d/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/ml/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/video/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/objdetect/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/contrib/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/photo/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/legacy/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/gpu/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/ocl/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/nonfree/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/stitching/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/superres/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/ts/include -I/Users/monso/code/superpixels/branches/porting/lib/opencv/modules/videostab/include -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/graphCuts -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../core -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../shaders -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/slic -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/libsvm-3.0 -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/rays3d -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/libDAI024/include -I/Users/monso/code/superpixels/branches/porting/tools/ssvm/core/../../../lib/mpir -I/Users/monso/code/boost_1_51_0 -o CMakeFiles/predict.dir/inference.o -c /Users/monso/code/superpixels/branches/porting/tools/ssvm/core/inference.cpp
以及 Mac 中链接行的摘录
g++ -Wall -O3 -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -D USE_REVERSE_INDEXING -D USE_LIBDAI -D USE_MAXFLOW -Wall -O3 -fopenmp -g -pg -D WITH_PNG -D WITH_OPENMP -D USE_REVERSE_INDEXING -D USE_RAYS3D -D RAYS_MULTITHREADING -D USE_ITK -O3 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/predict.dir/predict.o CMakeFiles/predict.dir/svm_struct/svm_struct_common.o CMakeFiles/predict.dir/svm_struct/svm_struct_learn.o CMakeFiles/predict.dir/svm_light/svm_common.o CMakeFiles/predict.dir/svm_light/svm_hideo.o CMakeFiles/predict.dir/svm_light/svm_learn.o CMakeFiles/predict.dir/svm_struct_api.o CMakeFiles/predict.dir/svm_struct_learn_custom.o CMakeFiles/predict.dir/constraint_set.o CMakeFiles/predict.dir/label_cache.o CMakeFiles/predict.dir/inference_globals.o CMakeFiles/predict.dir/computeStats.o CMakeFiles/predict.dir/globalStats.o CMakeFiles/predict.dir/energyParam.o CMakeFiles/predict.dir/inference.o CMakeFiles/predict.dir/graphInference.o CMakeFiles/predict.dir/gi_ICM.o CMakeFiles/predict.dir/gi_max.o CMakeFiles/predict.dir/gi_martingale.o CMakeFiles/predict.dir/gi_MF.o CMakeFiles/predict.dir/gi_sampling.o CMakeFiles/predict.dir/gi_libDAI.o CMakeFiles/predict.dir/gi_maxflow.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/BOF.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/colormap.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/Config.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/Feature.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Cluster.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_ColorHistogram.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Combo.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Gaussian.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Glcm.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Histogram.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_LoadFromFile.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_OrientedHistogram.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Position.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Precomputed.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Test.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/Histogram.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/HistogramND.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/oSVM.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/PixelData.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/Slice3d.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/Slice.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/Slice_P.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/SliceData.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/StatModel.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/Supernode.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/utils.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/lib/libsvm-3.0/svm.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_3dRays.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_CannyStats.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_Filter.o CMakeFiles/predict.dir/Users/monso/code/superpixels/branches/porting/core/F_GradientStats.o -o predict -L/Users/monso/code/InsightToolkit-3.20.1/build/bin -L/Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib -L/Users/monso/code/superpixels/branches/porting/lib/opencv/build/3rdparty/lib -L/Users/monso/code/superpixels/branches/porting/lib/slic/build -L/Users/monso/code/superpixels/branches/porting/lib/rays3d/build -L/Users/monso/code/superpixels/branches/porting/lib/libDAI024/build /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_contrib.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_stitching.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_nonfree.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_ocl.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_superres.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_ts.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_videostab.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_gpu.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_legacy.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_ml.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_objdetect.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_calib3d.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_photo.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_video.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_features2d.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_highgui.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/3rdparty/lib/libIlmImf.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/3rdparty/lib/liblibjasper.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/3rdparty/lib/liblibtiff.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/3rdparty/lib/liblibpng.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/3rdparty/lib/liblibjpeg.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_flann.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_imgproc.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/lib/libopencv_core.a /Users/monso/code/superpixels/branches/porting/lib/opencv/build/3rdparty/lib/libzlib.a -lstdc++ -framework OpenCL -framework Cocoa -framework QTKit -framework QuartzCore -framework AppKit /Users/monso/code/superpixels/branches/porting/lib/slic/build/libsupervoxel.a -lITKIO -lITKStatistics /Users/monso/code/superpixels/branches/porting/lib/rays3d/build/librays3d.a /Users/monso/code/superpixels/branches/porting/lib/libDAI024/build/libdai.a -lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litkopenjpeg -framework System -litkpng -litktiff -litkjpeg8 -lITKSpatialObject -lITKMetaIO -lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz -litkzlib -lITKCommon -lm -litksys -litkvnl_inst -litkvnl_algo -litkvnl -litkvcl -litkv3p_lsqr -litkNetlibSlatec -litkv3p_netlib -lm
知道为什么在 Mac 中将符号添加到两个不同的对象上吗?