CGAL: undefined reference to _createImage - image-processing

i'm getting undefined reference to `_createImage(int, int, int, int,
float, float, float, int, WORD_KIND, SIGN)', when i tried to take part of
code from :
https://doc.cgal.org/latest/Mesh_3/Mesh_3_2random_labeled_image_8h-example.html
Basically what i am trying to do is convert ITK image to CGAL image_3, and in order to do that i need to init image_3 with my own data, but it gives me undefined reference to _create_image. I have added headers of ImageIO and Image_3
const int dim = 400;
_image* image = _createImage(dim, dim, dim, 1,
1.f, 1.f, 1.f, 1,
WK_FIXED, SGN_UNSIGNED);
Cmakelist.txt
find_package(CGAL QUIET)
if( CGAL_FOUND)
include_directories("/usr/local/include")
message(STATUS "CGAL status:")
message(STATUS " libraries: ${CGAL_LIB}")
message(STATUS " include path: ${CGAL_INCLUDE_DIRS}")
endif(CGAL_FOUND)
target_link_libraries(main meshlib iolib ${ITK_LIBRARIES} ${CGAL_LIB} )
flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wall -g -Wextra -Wno-sign-compare -pthread -ltbb -lpthread -lCGAL -lCGAL_Core -lCGAL_ImageIO -lmpfr -lgmp -frounding-math ")
Failure:
libmeshlib.a(volumetric-image.cpp.o): In function
VolumetricImage::ItkImageToCgalImage(itk::SmartPointer<itk::Image<char,
3u> >&, CGAL::Image_3&)':
/home/n/Documents/b1/b1/src/volumetric-image.cpp:217:
undefined reference to_createImage(int, int, int, int, float, float,
float, int, WORD_KIND, SIGN)' libmeshlib.a(volumetric-image.cpp.o): In
function CGAL::Image_3::Image_3(point_image*)':
/usr/local/include/CGAL/Image_3.h:105: undefined reference to
CGAL::Image_3::private_read(point_image*)' collect2: error: ld
returned 1 exit status src/CMakeFiles/main.dir/build.make:419: recipe
for target 'src/main' failed make[2]: * [src/main] Error 1 make[2]:
Leaving directory '/home/noega/Documents/b1/b1/build'
CMakeFiles/Makefile2:896: recipe for target
'src/CMakeFiles/main.dir/all' failed make[1]: *
[src/CMakeFiles/main.dir/all] Error 2 make[1]: Leaving directory
'/home/n/Documents/b1/b1/build' Makefile:83: recipe for
target 'all' failed make: *** [all] Error 2
Method
void VolumetricImage::ItkImageToCgalImage(itk::Image<char, 3>::Pointer &in_volumetric_image, CGAL::Image_3 &out_image) {
typedef itk::Image< char, 3 > image_type;
image_type::RegionType region = in_volumetric_image->GetLargestPossibleRegion();
image_type::SizeType size = region.GetSize();
image_type::SpacingType voxel_size = in_volumetric_image->GetSpacing();
_image* im = _createImage(size[0], size[1], size[2], 1,
voxel_size[0], voxel_size[1], voxel_size[2],
1, WK_FIXED, SGN_SIGNED);
CGAL::Image_3 image(im);
}
EDIT 2:
92%] Linking CXX executable main cd
/home/n/Documents/b1/b1/build/src && /usr/bin/cmake -E
cmake_link_script CMakeFiles/main.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++11 -Wall -Wall -g -Wextra -Wno-sign-compare
-pthread -ltbb -lpthread -lCGAL -lCGAL_Core -lCGAL_ImageIO -lmpfr -lgmp -frounding-math
EDIT 3:
[ 92%] Linking CXX executable main cd
/home/n/Documents/b1/b1/build/src && /usr/bin/cmake -E
cmake_link_script CMakeFiles/main.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++11 -Wall -Wall -g -Wextra -Wno-sign-compare
-pthread -ltbb -lpthread -lCGAL -lCGAL_Core -lCGAL_ImageIO -lmpfr -lgmp -frounding-math CMakeFiles/main.dir/main.cpp.o -o main -rdynamic libmeshlib.a libiolib.a /usr/local/lib/libitkdouble-conversion-4.12.a
/usr/local/lib/libitksys-4.12.a /usr/local/lib/libitkvnl_algo-4.12.a
/usr/local/lib/libitkvnl-4.12.a /usr/local/lib/libitkv3p_netlib-4.12.a
/usr/local/lib/libitknetlib-4.12.a /usr/local/lib/libitkvcl-4.12.a
/usr/local/lib/libITKCommon-4.12.a
/usr/local/lib/libitkNetlibSlatec-4.12.a
/usr/local/lib/libITKStatistics-4.12.a
/usr/local/lib/libITKTransform-4.12.a
/usr/local/lib/libITKIOImageBase-4.12.a
/usr/local/lib/libITKIOBMP-4.12.a /usr/local/lib/libITKEXPAT-4.12.a
/usr/local/lib/libitkzlib-4.12.a /usr/local/lib/libitkgdcmDICT-4.12.a
/usr/local/lib/libitkgdcmMSFF-4.12.a
/usr/local/lib/libITKIOGDCM-4.12.a /usr/local/lib/libITKIOGIPL-4.12.a
/usr/local/lib/libitkjpeg-4.12.a /usr/local/lib/libITKIOJPEG-4.12.a
/usr/local/lib/libITKMetaIO-4.12.a /usr/local/lib/libITKIOMeta-4.12.a
/usr/local/lib/libITKznz-4.12.a /usr/local/lib/libITKniftiio-4.12.a
/usr/local/lib/libITKIONIFTI-4.12.a /usr/local/lib/libITKNrrdIO-4.12.a
/usr/local/lib/libITKIONRRD-4.12.a /usr/local/lib/libitkpng-4.12.a
/usr/local/lib/libITKIOPNG-4.12.a /usr/local/lib/libitktiff-4.12.a
/usr/local/lib/libITKIOTIFF-4.12.a /usr/local/lib/libITKIOVTK-4.12.a
/usr/local/lib/libITKLabelMap-4.12.a /usr/local/lib/libITKMesh-4.12.a
/usr/local/lib/libITKSpatialObjects-4.12.a
/usr/local/lib/libITKPath-4.12.a
/usr/local/lib/libITKQuadEdgeMesh-4.12.a
/usr/local/lib/libITKOptimizers-4.12.a
/usr/local/lib/libITKPolynomials-4.12.a
/usr/local/lib/libITKBiasCorrection-4.12.a
/usr/local/lib/libITKBioCell-4.12.a
/usr/local/lib/libITKDICOMParser-4.12.a
/usr/local/lib/libITKIOXML-4.12.a
/usr/local/lib/libITKIOSpatialObjects-4.12.a
/usr/local/lib/libITKFEM-4.12.a /usr/local/lib/libITKgiftiio-4.12.a
/usr/local/lib/libITKIOMesh-4.12.a /usr/local/lib/libitkhdf5_cpp.a
/usr/local/lib/libitkhdf5.a /usr/local/lib/libITKIOBioRad-4.12.a
/usr/local/lib/libITKIOCSV-4.12.a /usr/local/lib/libITKIOIPL-4.12.a
/usr/local/lib/libITKIOGE-4.12.a /usr/local/lib/libITKIOSiemens-4.12.a
/usr/local/lib/libITKIOHDF5-4.12.a /usr/local/lib/libITKIOLSM-4.12.a
/usr/local/lib/libITKIOMRC-4.12.a
/usr/local/lib/libITKIOStimulate-4.12.a
/usr/local/lib/libITKTransformFactory-4.12.a
/usr/local/lib/libITKIOTransformBase-4.12.a
/usr/local/lib/libITKIOTransformHDF5-4.12.a
/usr/local/lib/libITKIOTransformInsightLegacy-4.12.a
/usr/local/lib/libITKIOTransformMatlab-4.12.a
/usr/local/lib/libITKKLMRegionGrowing-4.12.a
/usr/local/lib/libITKVTK-4.12.a /usr/local/lib/libITKWatersheds-4.12.a
/usr/local/lib/libITKOptimizersv4-4.12.a
/usr/local/lib/libITKVideoCore-4.12.a
/usr/local/lib/libITKVideoIO-4.12.a -lCGAL
/usr/local/lib/libvtkzlib-8.0.a
/usr/local/lib/libvtkFiltersImaging-8.0.a
/usr/local/lib/libvtkCommonCore-8.0.a /usr/local/lib/libvtksys-8.0.a
/usr/local/lib/libvtkCommonDataModel-8.0.a
/usr/local/lib/libvtkCommonMath-8.0.a
/usr/local/lib/libvtkCommonMisc-8.0.a
/usr/local/lib/libvtkCommonSystem-8.0.a
/usr/local/lib/libvtkCommonTransforms-8.0.a
/usr/local/lib/libvtkCommonExecutionModel-8.0.a
/usr/local/lib/libvtkFiltersStatistics-8.0.a
/usr/local/lib/libvtkImagingFourier-8.0.a
/usr/local/lib/libvtkImagingCore-8.0.a
/usr/local/lib/libvtkalglib-8.0.a
/usr/local/lib/libvtkImagingGeneral-8.0.a
/usr/local/lib/libvtkImagingSources-8.0.a
/usr/local/lib/libvtkFiltersFlowPaths-8.0.a
/usr/local/lib/libvtkFiltersCore-8.0.a
/usr/local/lib/libvtkFiltersGeometry-8.0.a
/usr/local/lib/libvtkFiltersSources-8.0.a
/usr/local/lib/libvtkCommonComputationalGeometry-8.0.a
/usr/local/lib/libvtkFiltersGeneral-8.0.a
/usr/local/lib/libvtkIOCore-8.0.a /usr/local/lib/libvtklz4-8.0.a
/usr/local/lib/libvtkFiltersProgrammable-8.0.a
/usr/local/lib/libvtkDICOMParser-8.0.a
/usr/local/lib/libvtkRenderingOpenGL2-8.0.a
/usr/local/lib/libvtkRenderingCore-8.0.a
/usr/local/lib/libvtkCommonColor-8.0.a /usr/local/lib/libvtkglew-8.0.a
/usr/local/lib/libvtkIOTecplotTable-8.0.a
/usr/local/lib/libvtkFiltersSelection-8.0.a
/usr/local/lib/libvtkRenderingImage-8.0.a
/usr/local/lib/libvtkFiltersAMR-8.0.a /usr/local/lib/libvtkIOXML-8.0.a
/usr/local/lib/libvtkIOXMLParser-8.0.a
/usr/local/lib/libvtkexpat-8.0.a
/usr/local/lib/libvtkParallelCore-8.0.a
/usr/local/lib/libvtkIOLegacy-8.0.a
/usr/local/lib/libvtkImagingStencil-8.0.a
/usr/local/lib/libvtkhdf5_hl-8.0.a /usr/local/lib/libvtkhdf5-8.0.a
/usr/local/lib/libvtkImagingMorphological-8.0.a
/usr/local/lib/libvtklibharu-8.0.a /usr/local/lib/libvtkpng-8.0.a
/usr/local/lib/libvtkIOAMR-8.0.a
/usr/local/lib/libvtkFiltersTexture-8.0.a
/usr/local/lib/libvtkproj4-8.0.a
/usr/local/lib/libvtkViewsContext2D-8.0.a
/usr/local/lib/libvtkRenderingContext2D-8.0.a
/usr/local/lib/libvtkRenderingFreeType-8.0.a
/usr/local/lib/libvtkfreetype-8.0.a
/usr/local/lib/libvtkViewsCore-8.0.a
/usr/local/lib/libvtkInteractionWidgets-8.0.a
/usr/local/lib/libvtkFiltersHybrid-8.0.a
/usr/local/lib/libvtkFiltersModeling-8.0.a
/usr/local/lib/libvtkImagingColor-8.0.a
/usr/local/lib/libvtkImagingHybrid-8.0.a
/usr/local/lib/libvtkIOImage-8.0.a /usr/local/lib/libvtkmetaio-8.0.a
/usr/local/lib/libvtkjpeg-8.0.a /usr/local/lib/libvtktiff-8.0.a
/usr/local/lib/libvtkInteractionStyle-8.0.a
/usr/local/lib/libvtkFiltersExtraction-8.0.a
/usr/local/lib/libvtkRenderingAnnotation-8.0.a
/usr/local/lib/libvtkRenderingVolume-8.0.a
/usr/local/lib/libvtkRenderingGL2PSOpenGL2-8.0.a
/usr/local/lib/libvtkgl2ps-8.0.a
/usr/local/lib/libvtkTestingIOSQL-8.0.a
/usr/local/lib/libvtkIOSQL-8.0.a /usr/local/lib/libvtksqlite-8.0.a
/usr/local/lib/libvtkFiltersHyperTree-8.0.a
/usr/local/lib/libvtkNetCDF-8.0.a /usr/local/lib/libvtkverdict-8.0.a
/usr/local/lib/libvtkInfovisCore-8.0.a
/usr/local/lib/libvtkRenderingLOD-8.0.a
/usr/local/lib/libvtkRenderingContextOpenGL2-8.0.a
/usr/local/lib/libvtkLocalExample-8.0.a
/usr/local/lib/libvtkIOExportOpenGL2-8.0.a
/usr/local/lib/libvtkIOExport-8.0.a
/usr/local/lib/libvtkViewsInfovis-8.0.a
/usr/local/lib/libvtkChartsCore-8.0.a
/usr/local/lib/libvtkInfovisLayout-8.0.a
/usr/local/lib/libvtkRenderingLabel-8.0.a
/usr/local/lib/libvtkDomainsChemistry-8.0.a
/usr/local/lib/libvtkexoIIc-8.0.a
/usr/local/lib/libvtkFiltersSMP-8.0.a
/usr/local/lib/libvtknetcdf_c++.a
/usr/local/lib/libvtkFiltersParallelImaging-8.0.a
/usr/local/lib/libvtkFiltersParallel-8.0.a
/usr/local/lib/libvtkFiltersVerdict-8.0.a
/usr/local/lib/libvtkInteractionImage-8.0.a
/usr/local/lib/libvtkIOImport-8.0.a
/usr/local/lib/libvtkTestingRendering-8.0.a
/usr/local/lib/libvtklibxml2-8.0.a
/usr/local/lib/libvtkIOParallel-8.0.a
/usr/local/lib/libvtkIOGeometry-8.0.a
/usr/local/lib/libvtkIONetCDF-8.0.a /usr/local/lib/libvtkjsoncpp-8.0.a
/usr/local/lib/libvtkDomainsChemistryOpenGL2-8.0.a
/usr/local/lib/libvtkFiltersPoints-8.0.a
/usr/local/lib/libvtkoggtheora-8.0.a
/usr/local/lib/libvtkTestingGenericBridge-8.0.a
/usr/local/lib/libvtkIOMovie-8.0.a
/usr/local/lib/libvtkImagingMath-8.0.a
/usr/local/lib/libvtkIOVideo-8.0.a
/usr/local/lib/libvtkGeovisCore-8.0.a /usr/local/lib/libvtkIOPLY-8.0.a
/usr/local/lib/libvtkIOEnSight-8.0.a
/usr/local/lib/libvtkIOInfovis-8.0.a
/usr/local/lib/libvtkIOExodus-8.0.a
/usr/local/lib/libvtkIOLSDyna-8.0.a
/usr/local/lib/libvtkImagingStatistics-8.0.a
/usr/local/lib/libvtkFiltersGeneric-8.0.a
/usr/local/lib/libvtkFiltersTopology-8.0.a
/usr/local/lib/libvtkIOMINC-8.0.a
/usr/local/lib/libvtkRenderingVolumeOpenGL2-8.0.a
/usr/local/lib/libvtkIOParallelXML-8.0.a -lgmp
/usr/local/lib/libmpfr.so -lboost_log -lboost_log_setup -lboost_thread
-lboost_date_time -lboost_filesystem -lboost_system -lboost_regex -lboost_chrono -lboost_atomic -lpthread /usr/local/lib/libitkgdcmMSFF-4.12.a
/usr/local/lib/libitkgdcmDICT-4.12.a
/usr/local/lib/libitkgdcmIOD-4.12.a
/usr/local/lib/libitkgdcmDSED-4.12.a
/usr/local/lib/libitkgdcmCommon-4.12.a
/usr/local/lib/libitkgdcmjpeg8-4.12.a
/usr/local/lib/libitkgdcmjpeg12-4.12.a
/usr/local/lib/libitkgdcmjpeg16-4.12.a
/usr/local/lib/libitkgdcmopenjpeg-4.12.a
/usr/local/lib/libitkgdcmcharls-4.12.a
/usr/local/lib/libitkgdcmuuid-4.12.a
/usr/local/lib/libITKNrrdIO-4.12.a /usr/local/lib/libitkpng-4.12.a
/usr/local/lib/libITKIOXML-4.12.a /usr/local/lib/libITKMetaIO-4.12.a
/usr/local/lib/libITKgiftiio-4.12.a /usr/local/lib/libITKEXPAT-4.12.a
/usr/local/lib/libITKniftiio-4.12.a /usr/local/lib/libITKznz-4.12.a
/usr/local/lib/libITKIOIPL-4.12.a /usr/local/lib/libITKIOTIFF-4.12.a
/usr/local/lib/libitktiff-4.12.a /usr/local/lib/libitkjpeg-4.12.a
/usr/local/lib/libitkhdf5_cpp.a /usr/local/lib/libitkhdf5.a
/usr/local/lib/libitkzlib-4.12.a
/usr/local/lib/libITKIOTransformBase-4.12.a
/usr/local/lib/libITKTransformFactory-4.12.a
/usr/local/lib/libITKSpatialObjects-4.12.a
/usr/local/lib/libITKMesh-4.12.a /usr/local/lib/libITKTransform-4.12.a
/usr/local/lib/libITKPath-4.12.a
/usr/local/lib/libITKOptimizers-4.12.a
/usr/local/lib/libITKStatistics-4.12.a
/usr/local/lib/libitkNetlibSlatec-4.12.a
/usr/local/lib/libITKIOImageBase-4.12.a
/usr/local/lib/libITKVideoCore-4.12.a
/usr/local/lib/libITKCommon-4.12.a
/usr/local/lib/libitkdouble-conversion-4.12.a
/usr/local/lib/libitksys-4.12.a
/usr/local/lib/libITKVNLInstantiation-4.12.a
/usr/local/lib/libitkvnl_algo-4.12.a /usr/local/lib/libitkvnl-4.12.a
/usr/local/lib/libitkv3p_netlib-4.12.a
/usr/local/lib/libitknetlib-4.12.a /usr/local/lib/libitkvcl-4.12.a
/usr/local/lib/libvtkFiltersAMR-8.0.a
/usr/local/lib/libvtklibharu-8.0.a
/usr/local/lib/libvtkRenderingGL2PSOpenGL2-8.0.a
/usr/local/lib/libvtkgl2ps-8.0.a
/usr/local/lib/libvtkRenderingContext2D-8.0.a
/usr/local/lib/libvtkFiltersImaging-8.0.a
/usr/local/lib/libvtkverdict-8.0.a
/usr/local/lib/libvtkFiltersParallel-8.0.a
/usr/local/lib/libvtknetcdf_c++.a
/usr/local/lib/libvtkDomainsChemistry-8.0.a
/usr/local/lib/libvtkoggtheora-8.0.a /usr/local/lib/libvtkproj4-8.0.a
/usr/local/lib/libvtkViewsCore-8.0.a
/usr/local/lib/libvtkInteractionWidgets-8.0.a
/usr/local/lib/libvtkImagingGeneral-8.0.a
/usr/local/lib/libvtkRenderingAnnotation-8.0.a
/usr/local/lib/libvtkRenderingFreeType-8.0.a
/usr/local/lib/libvtkfreetype-8.0.a
/usr/local/lib/libvtkImagingColor-8.0.a
/usr/local/lib/libvtkInteractionStyle-8.0.a
/usr/local/lib/libvtkInfovisLayout-8.0.a
/usr/local/lib/libvtkFiltersModeling-8.0.a
/usr/local/lib/libvtkImagingHybrid-8.0.a
/usr/local/lib/libvtkInfovisCore-8.0.a
/usr/local/lib/libvtkFiltersExtraction-8.0.a
/usr/local/lib/libvtkFiltersStatistics-8.0.a
/usr/local/lib/libvtkImagingFourier-8.0.a
/usr/local/lib/libvtkalglib-8.0.a /usr/local/lib/libvtklibxml2-8.0.a
/usr/local/lib/libvtkexoIIc-8.0.a
/usr/local/lib/libvtkFiltersHybrid-8.0.a
/usr/local/lib/libvtkImagingSources-8.0.a
/usr/local/lib/libvtkIOImage-8.0.a
/usr/local/lib/libvtkDICOMParser-8.0.a /usr/local/lib/libvtkpng-8.0.a
-lm /usr/local/lib/libvtkmetaio-8.0.a /usr/local/lib/libvtktiff-8.0.a /usr/local/lib/libvtkjpeg-8.0.a -lm /usr/local/lib/libvtkNetCDF-8.0.a
/usr/local/lib/libvtkhdf5_hl-8.0.a /usr/local/lib/libvtkhdf5-8.0.a -lm
/usr/local/lib/libvtkRenderingOpenGL2-8.0.a -lSM -lICE -lX11 -lXext
-lXt /usr/local/lib/libvtkglew-8.0.a /usr/local/lib/libvtkRenderingVolume-8.0.a
/usr/local/lib/libvtkImagingCore-8.0.a
/usr/local/lib/libvtkRenderingCore-8.0.a
/usr/local/lib/libvtkFiltersGeometry-8.0.a
/usr/local/lib/libvtkFiltersSources-8.0.a
/usr/local/lib/libvtkFiltersGeneral-8.0.a
/usr/local/lib/libvtkFiltersCore-8.0.a
/usr/local/lib/libvtkCommonComputationalGeometry-8.0.a
/usr/local/lib/libvtkCommonColor-8.0.a
/usr/local/lib/libvtkImagingMath-8.0.a -lGLU -lGL
/usr/local/lib/libvtkIOXML-8.0.a
/usr/local/lib/libvtkIOXMLParser-8.0.a
/usr/local/lib/libvtkexpat-8.0.a
/usr/local/lib/libvtkParallelCore-8.0.a
/usr/local/lib/libvtkIOLegacy-8.0.a /usr/local/lib/libvtkIOCore-8.0.a
/usr/local/lib/libvtkzlib-8.0.a
/usr/local/lib/libvtkCommonExecutionModel-8.0.a
/usr/local/lib/libvtkCommonDataModel-8.0.a
/usr/local/lib/libvtkCommonTransforms-8.0.a
/usr/local/lib/libvtkCommonMisc-8.0.a
/usr/local/lib/libvtkCommonMath-8.0.a
/usr/local/lib/libvtkCommonSystem-8.0.a
/usr/local/lib/libvtkCommonCore-8.0.a /usr/local/lib/libvtksys-8.0.a
-ldl -lpthread /usr/local/lib/libvtklz4-8.0.a -Wl,-rpath,/usr/local/lib ^[[A^[[A^[[A^[[A^[[Alibmeshlib.a(volumetric-image.cpp.o): In function
VolumetricImage::ItkImageToCgalImage(itk::SmartPointer<itk::Image<char,
3u> >&, CGAL::Image_3&)':
/home/n/Documents/b1/b1/src/volumetric-image.cpp:217: undefined
reference to_createImage(int, int, int, int, float, float, float,
int, WORD_KIND, SIGN)' libmeshlib.a(volumetric-image.cpp.o): In
function CGAL::Image_3::Image_3(point_image*)':
/usr/local/include/CGAL/Image_3.h:105: undefined reference to
CGAL::Image_3::private_read(point_image*)' collect2: error: ld
returned 1 exit status src/CMakeFiles/main.dir/build.make:419: recipe
for target 'src/main' failed make[2]: * [src/main] Error 1 make[2]:
Leaving directory '/home/n/Documents/b1/b1/build'
CMakeFiles/Makefile2:896: recipe for target
'src/CMakeFiles/main.dir/all' failed make[1]: *
[src/CMakeFiles/main.dir/all] Error 2 make[1]: Leaving directory
'/home/n/Documents/b1/b1/build' Makefile:83: recipe for target 'all'
failed make: *** [all] Error 2

You seem to be failing to properly set up linking for CGAL. This thread should help. Just link to ITK instead of VTK.

Related

how to add a ModulePassManager in llvm pass?

I'm trying to add a ModulePassManager in llvm pass, because all pass is function pass, so all I added createModuleToFunctionPassAdaptor function, but compile error, I don't know how to solve it. does anybody know how to solve this problem. I tried this:
llvm::PreservedAnalyses DBogusFlow::run(llvm::Module &M,
llvm::ModuleAnalysisManager &MAM) {
bool Changed = runOnModule(M);
auto MPM = std::make_unique<ModulePassManager>();
MPM->addPass(createModuleToFunctionPassAdaptor(createAggressiveDCEPass()));
MPM->addPass(
createModuleToFunctionPassAdaptor(createInstructionCombiningPass()));
MPM->addPass(
createModuleToFunctionPassAdaptor(createCFGSimplificationPass()));
MPM->run(M, MAM);
return (Changed ? llvm::PreservedAnalyses::none()
: llvm::PreservedAnalyses::all());
}
below is the compile error
[ 50%] Building CXX object CMakeFiles/DBogusFlow.dir/lib/DBogusFlow.cpp.o
In file included from /usr/include/llvm/IR/PassManager.h:48,
from /home/v4kst1z/Desktop/ollvm-deobfuscator/lib/../include/DBogusFlow.h:12,
from /home/v4kst1z/Desktop/ollvm-deobfuscator/lib/DBogusFlow.cpp:9:
/usr/include/llvm/IR/PassManagerInternal.h: In instantiation of ‘PreservedAnalysesT llvm::detail::PassModel<IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs>::run(IRUnitT&, AnalysisManagerT&, ExtraArgTs ...) [with IRUnitT = llvm::Function; PassT = llvm::FunctionPass*; PreservedAnalysesT = llvm::PreservedAnalyses; AnalysisManagerT = llvm::AnalysisManager<llvm::Function>; ExtraArgTs = {}]’:
/usr/include/llvm/IR/PassManagerInternal.h:83:22: required from here
/usr/include/llvm/IR/PassManagerInternal.h:85:17: error: request for member ‘run’ in ‘((llvm::detail::PassModel<llvm::Function, llvm::FunctionPass*, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >*)this)->llvm::detail::PassModel<llvm::Function, llvm::FunctionPass*, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >::Pass’, which is of pointer type ‘llvm::FunctionPass*’ (maybe you meant to use ‘->’ ?)
85 | return Pass.run(IR, AM, ExtraArgs...);
| ~~~~~^~~
/usr/include/llvm/IR/PassManagerInternal.h: In instantiation of ‘llvm::StringRef llvm::detail::PassModel<IRUnitT, PassT, PreservedAnalysesT, AnalysisManagerT, ExtraArgTs>::name() const [with IRUnitT = llvm::Function; PassT = llvm::FunctionPass*; PreservedAnalysesT = llvm::PreservedAnalyses; AnalysisManagerT = llvm::AnalysisManager<llvm::Function>; ExtraArgTs = {}]’:
/usr/include/llvm/IR/PassManagerInternal.h:88:13: required from here
/usr/include/llvm/IR/PassManagerInternal.h:88:55: error: ‘name’ is not a member of ‘llvm::FunctionPass*’
88 | StringRef name() const override { return PassT::name(); }
| ~~~~~~~~~~~^~
make[2]: *** [CMakeFiles/DBogusFlow.dir/build.make:76: CMakeFiles/DBogusFlow.dir/lib/DBogusFlow.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/DBogusFlow.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Error: invalid initialization of non-const reference of type ‘const RTT::corba::CConnPolicy*&’

I'm trying build the package orocos-toolchain from source.I have already build the ace and tao package inside ACE_wrapper which i downloaded from this page. But after i enter command" catkin_make_isolated --install -DENABLE_CORBA=ON -DCORBA_IMPLEMENTATION=TAO " I'm getting below error:
[100%] Building CXX object rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/CorbaLib.cpp.o
In file included from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:50:0:
/home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/RTTCorbaConversion.hpp: In static member function ‘static bool RTT::corba::AnyConversion<RTT::ConnPolicy>::update(const CORBA::Any&, RTT::corba::AnyConversion<RTT::ConnPolicy>::StdType&)’:
/home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/RTTCorbaConversion.hpp:313:18: error: invalid initialization of non-const reference of type ‘const RTT::corba::CConnPolicy*&’ from an rvalue of type ‘const RTT::corba::CConnPolicy*’
if ( any >>= result ) {
^
In file included from /home/dinesh/ws/underlay_isolated/build_isolated/rtt/install/rtt/transports/corba/ServiceC.h:114:0,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTypeTransporter.hpp:44,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTemplateProtocol.hpp:42,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:49:
/home/dinesh/ws/underlay_isolated/build_isolated/rtt/install/rtt/transports/corba/DataFlowC.h:1320:32: note: initializing argument 2 of ‘CORBA::Boolean operator>>=(const CORBA::Any&, const RTT::corba::CConnPolicy*&)’
RTT_CORBA_API ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const RTT::corba::CConnPolicy *&);
^
In file included from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/DataFlowI.h:47:0,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/RemoteChannelElement.hpp:42,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTemplateProtocol.hpp:43,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:49:
/home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaConversion.hpp: In instantiation of ‘static bool RTT::corba::AnyConversion<std::vector<_Tp, _Alloc> >::update(const CORBA::Any&, RTT::corba::AnyConversion<std::vector<_Tp, _Alloc> >::StdType&) [with T = double; _Alloc = std::allocator<double>; RTT::corba::AnyConversion<std::vector<_Tp, _Alloc> >::StdType = std::vector<double>]’:
/home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTemplateProtocol.hpp:118:57: required from ‘bool RTT::corba::CorbaTemplateProtocol<T>::updateFromAny(const CORBA::Any*, RTT::base::DataSourceBase::shared_ptr) const [with T = std::vector<double>; RTT::base::DataSourceBase::shared_ptr = boost::intrusive_ptr<RTT::base::DataSourceBase>]’
/home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:208:1: required from here
/home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaConversion.hpp:259:18: error: invalid initialization of non-const reference of type ‘const CORBA::DoubleSeq*&’ from an rvalue of type ‘const CORBA::DoubleSeq*’
if ( any >>= result ) {
^
In file included from /home/dinesh/ws/underlay_isolated/build_isolated/rtt/install/rtt/transports/corba/ServiceC.h:51:0,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTypeTransporter.hpp:44,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaTemplateProtocol.hpp:42,
from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:49:
/home/dinesh/ACE_wrappers/TAO/tao/AnyTypeCode/DoubleSeqA.h:86:41: note: initializing argument 2 of ‘CORBA::Boolean operator>>=(const CORBA::Any&, const CORBA::DoubleSeq*&)’
TAO_AnyTypeCode_Export ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const CORBA::DoubleSeq *&);
^
In file included from /home/dinesh/ws/underlay_isolated/src/orocos/orocos_toolchain/rtt/rtt/transports/corba/CorbaLib.cpp:42:0:
/home/dinesh/ACE_wrappers/TAO/tao/PortableServer/PortableServer.h: At global scope:
/home/dinesh/ACE_wrappers/TAO/tao/PortableServer/PortableServer.h:34:1: warning: ‘TAO_Requires_POA_Initializer’ defined but not used [-Wunused-variable]
TAO_Requires_POA_Initializer = TAO_POA_Initializer::init ();
^
rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/build.make:62: recipe for target 'rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/CorbaLib.cpp.o' failed
make[2]: *** [rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/CorbaLib.cpp.o] Error 1
CMakeFiles/Makefile2:935: recipe for target 'rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/all' failed
make[1]: *** [rtt/transports/corba/CMakeFiles/rtt-transport-corba-gnulinux_plugin.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'rtt':
Command '['/home/dinesh/ws/underlay_isolated/install_isolated/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2
Reproduce this error by running:
==> cd /home/dinesh/ws/underlay_isolated/build_isolated/rtt && /home/dinesh/ws/underlay_isolated/install_isolated/env.sh make -j4 -l4
Command failed, exiting.
Try to change CorbaType* result; to const CorbaType* result; on line 259 of rtt/rtt/transports/corba/CorbaConversion.hpp

Im Getting Errors From Terminal About My Code

I have almost finished my code, but terminal is giving me the following errors:
Tweak.xm:149:15: error: unused variable 'settings' [-Werror,-Wunused-variable]
NSDictionary *settings = [[NSDictionary alloc] initWithContentsOfFile:#"...
^
Tweak.xm:152:1: error: expected unqualified-id
if (settings) {
^
Tweak.xm:156:1: error: expected unqualified-id
if (lsSame) {
^
3 errors generated.
make[2]: *** [obj/Tweak.xm.c8cb265e.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [CustomColr.all.tweak.variables] Error 2
Here is my code:
http://pastie.org/10076062

Using LiuLiu's CCV under iOS

I'm trying to use CCV library under IOS. I'm trying a ver simple test: open file and save it back to disk — but it doesn't work.
NSString *srcPath, *dstPath;
srcPath = [[NSBundle mainBundle] pathForResource:#"src" ofType:#"jpg"];
dstPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0] stringByAppendingPathComponent:#"dst.jpg"];
ccv_dense_matrix_t* image = 0;
ccv_read((char*)[srcPath cStringUsingEncoding:NSUTF8StringEncoding], &image, CCV_IO_JPEG_FILE);
// BREAKPOINT
ccv_write(image, (char*)[dstPath cStringUsingEncoding:NSUTF8StringEncoding], 0, CCV_IO_JPEG_FILE, 0);
When app stops at breakpoint image == NULL
When app finishes I can find dst.jpg file, but it's size is 0 bytes.
What am i doing wrong?
I'm using libccv.a that I manually complied with this config:
XCODE_SDK := iphoneos7.0
ARCH := armv7
CC := clang
AR := ar
CFLAGS := -arch armv7 -isysroot "/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk" -D HAVE_LIBJPEG -I/usr/X11/include
LDFLAGS := -lm -arch armv7 -isysroot "/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk" -ljpeg -lz -L/usr/X11/lib
I also use libjpeg.a that I've downloaded from github: https://github.com/swisspol/Libraries/blob/master/Libraries-iOS/libjpeg-turbo/lib/libjpeg.a

OpenCV Undefined symbols for architecture : cv::imread

so after much research on stack overflow I've still not been able to overcome the linking error that I'm encountering. I've tried changing the search parch to recursive, added linker flags and tried to link dynamic libraries (.dylibs - I'm still somewhat uncertain on how to install this.) with no success.
Any help would be appreciated:
Errors :
Ld /Users/Pete/Library/Developer/Xcode/DerivedData/test- grdrvveervoomvcdkcjjqdekbjcq/Build/Products/Debug/test normal x86_64
cd "/Users/Pete/Documents/University work/Third year Computer Science/practice/test"
setenv MACOSX_DEPLOYMENT_TARGET 10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/Pete/Library/Developer/Xcode/DerivedData/test- grdrvveervoomvcdkcjjqdekbjcq/Build/Products/Debug -L/usr/local/lib -L/usr/local/lib/pkgconfig -L/usr/local/lib/python2.7 -L/usr/local/lib/python2.7/site-packages - L/usr/local/lib/python2.7/site-packages "-L/Users/Pete/Documents/University work/Third year Computer Science/practice/test/../../../../../Downloads/OpenCV.framework" - F/Users/Pete/Library/Developer/Xcode/DerivedData/test- grdrvveervoomvcdkcjjqdekbjcq/Build/Products/Debug -filelist /Users/Pete/Library/Developer/Xcode/DerivedData/test- grdrvveervoomvcdkcjjqdekbjcq/Build/Intermediates/test.build/Debug/test.build/Objects- normal/x86_64/test.LinkFileList -mmacosx-version-min=10.8 -lm -lopencv_core -lopencv_highgui - lopencv_video -lopencv_imgproc -stdlib=libc++ -o /Users/Pete/Library/Developer/Xcode/DerivedData/test- grdrvveervoomvcdkcjjqdekbjcq/Build/Products/Debug/test
Undefined symbols for architecture x86_64:
"cv::imread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int)", referenced from:
ex6(int, char**) in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Configuration:
//:configuration = Debug
ARCHS = $(ARCHS_STANDARD_64_BIT)
SDKROOT = macosx
ONLY_ACTIVE_ARCH = YES
MACOSX_DEPLOYMENT_TARGET = 10.8
COPY_PHASE_STRIP = NO
OTHER_LDFLAGS = -lm -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc
ALWAYS_SEARCH_USER_PATHS = NO
HEADER_SEARCH_PATHS = /usr/local/include /opt/local/include
LIBRARY_SEARCH_PATHS = /usr/local/lib/**
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
GCC_SYMBOLS_PRIVATE_EXTERN = NO
GCC_C_LANGUAGE_STANDARD = gnu99
CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
CLANG_CXX_LIBRARY = libc++
GCC_ENABLE_OBJC_EXCEPTIONS = YES
CLANG_ENABLE_OBJC_ARC = YES
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES
GCC_WARN_UNUSED_VARIABLE = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
//:configuration = Release
ARCHS = $(ARCHS_STANDARD_64_BIT)
SDKROOT = macosx
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
MACOSX_DEPLOYMENT_TARGET = 10.8
COPY_PHASE_STRIP = YES
OTHER_LDFLAGS = -lm -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc
ALWAYS_SEARCH_USER_PATHS = NO
HEADER_SEARCH_PATHS = /usr/local/include /opt/local/include
LIBRARY_SEARCH_PATHS = /usr/local/lib/**
GCC_C_LANGUAGE_STANDARD = gnu99
CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
CLANG_CXX_LIBRARY = libc++
GCC_ENABLE_OBJC_EXCEPTIONS = YES
CLANG_ENABLE_OBJC_ARC = YES
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES
GCC_WARN_UNUSED_VARIABLE = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
//:completeSettings = some
ADDITIONAL_SDKS
ARCHS
SDKROOT
ONLY_ACTIVE_ARCH
SUPPORTED_PLATFORMS
VALID_ARCHS
SYMROOT
OBJROOT
CONFIGURATION_BUILD_DIR
CONFIGURATION_TEMP_DIR
SHARED_PRECOMPS_DIR
BUILD_VARIANTS
GCC_VERSION
DEBUG_INFORMATION_FORMAT
GENERATE_PROFILING_CODE
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR
RUN_CLANG_STATIC_ANALYZER
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES
VALIDATE_PRODUCT
CODE_SIGN_ENTITLEMENTS
CODE_SIGN_IDENTITY
CODE_SIGN_RESOURCE_RULES_PATH
OTHER_CODE_SIGN_FLAGS
STRIPFLAGS
ALTERNATE_GROUP
ALTERNATE_OWNER
ALTERNATE_MODE
ALTERNATE_PERMISSIONS_FILES
COMBINE_HIDPI_IMAGES
DEPLOYMENT_LOCATION
DEPLOYMENT_POSTPROCESSING
INSTALL_GROUP
INSTALL_OWNER
INSTALL_MODE_FLAG
DSTROOT
INSTALL_PATH
MACOSX_DEPLOYMENT_TARGET
PRODUCT_DEFINITION_PLIST
SKIP_INSTALL
COPY_PHASE_STRIP
STRIP_INSTALLED_PRODUCT
STRIP_STYLE
SEPARATE_STRIP
MODULE_NAME
MODULE_START
MODULE_STOP
MODULE_VERSION
BUNDLE_LOADER
DYLIB_COMPATIBILITY_VERSION
DYLIB_CURRENT_VERSION
DEAD_CODE_STRIPPING
LINKER_DISPLAYS_MANGLED_NAMES
PRESERVE_DEAD_CODE_INITS_AND_TERMS
LD_DYLIB_INSTALL_NAME
EXPORTED_SYMBOLS_FILE
LD_NO_PIE
INIT_ROUTINE
LINK_WITH_STANDARD_LIBRARIES
MACH_O_TYPE
ORDER_FILE
OTHER_LDFLAGS
LD_MAP_FILE_PATH
GENERATE_MASTER_OBJECT_FILE
PRELINK_LIBS
KEEP_PRIVATE_EXTERNS
LD_RUNPATH_SEARCH_PATHS
SEPARATE_SYMBOL_EDIT
PRELINK_FLAGS
SECTORDER_FLAGS
UNEXPORTED_SYMBOLS_FILE
WARNING_LDFLAGS
LD_GENERATE_MAP_FILE
APPLY_RULES_IN_COPY_FILES
EXECUTABLE_EXTENSION
EXECUTABLE_PREFIX
INFOPLIST_EXPAND_BUILD_SETTINGS
GENERATE_PKGINFO_FILE
FRAMEWORK_VERSION
INFOPLIST_FILE
INFOPLIST_OTHER_PREPROCESSOR_FLAGS
INFOPLIST_OUTPUT_FORMAT
INFOPLIST_PREPROCESSOR_DEFINITIONS
INFOPLIST_PREFIX_HEADER
INFOPLIST_PREPROCESS
COPYING_PRESERVES_HFS_DATA
PRIVATE_HEADERS_FOLDER_PATH
PRODUCT_NAME
PLIST_FILE_OUTPUT_FORMAT
PUBLIC_HEADERS_FOLDER_PATH
STRINGS_FILE_OUTPUT_ENCODING
WRAPPER_EXTENSION
ALWAYS_SEARCH_USER_PATHS
FRAMEWORK_SEARCH_PATHS
HEADER_SEARCH_PATHS
LIBRARY_SEARCH_PATHS
REZ_SEARCH_PATHS
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES
INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES
USER_HEADER_SEARCH_PATHS
OTHER_TEST_FLAGS
TEST_AFTER_BUILD
TEST_HOST
TEST_RIG
CURRENT_PROJECT_VERSION
VERSION_INFO_FILE
VERSION_INFO_EXPORT_DECL
VERSION_INFO_PREFIX
VERSION_INFO_SUFFIX
VERSIONING_SYSTEM
VERSION_INFO_BUILDER
GCC_FAST_OBJC_DISPATCH
CLANG_X86_VECTOR_INSTRUCTIONS
GCC_STRICT_ALIASING
GCC_GENERATE_DEBUGGING_SYMBOLS
GCC_DYNAMIC_NO_PIC
GCC_GENERATE_TEST_COVERAGE_FILES
GCC_INLINES_ARE_PRIVATE_EXTERN
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS
GCC_ENABLE_KERNEL_DEVELOPMENT
LLVM_LTO
GCC_REUSE_STRINGS
GCC_NO_COMMON_BLOCKS
GCC_OPTIMIZATION_LEVEL
GCC_FAST_MATH
GCC_THREADSAFE_STATICS
GCC_SYMBOLS_PRIVATE_EXTERN
GCC_UNROLL_LOOPS
GCC_CHAR_IS_UNSIGNED_CHAR
GCC_ENABLE_ASM_KEYWORD
GCC_C_LANGUAGE_STANDARD
CLANG_CXX_LANGUAGE_STANDARD
CLANG_CXX_LIBRARY
GCC_CW_ASM_SYNTAX
GCC_INPUT_FILETYPE
GCC_ENABLE_CPP_EXCEPTIONS
GCC_ENABLE_CPP_RTTI
GCC_LINK_WITH_DYNAMIC_LIBRARIES
GCC_ENABLE_OBJC_EXCEPTIONS
GCC_ENABLE_TRIGRAPHS
GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS
GCC_USE_INDIRECT_FUNCTION_CALLS
GCC_USE_REGISTER_FUNCTION_CALLS
CLANG_LINK_OBJC_RUNTIME
GCC_INCREASE_PRECOMPILED_HEADER_SHARING
CLANG_ENABLE_OBJC_ARC
OTHER_CFLAGS
OTHER_CPLUSPLUSFLAGS
GCC_PRECOMPILE_PREFIX_HEADER
GCC_PREFIX_HEADER
GCC_ENABLE_BUILTIN_FUNCTIONS
GCC_ENABLE_PASCAL_STRINGS
GCC_SHORT_ENUMS
GCC_USE_STANDARD_INCLUDE_SEARCHING
GCC_PREPROCESSOR_DEFINITIONS
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS
GCC_WARN_INHIBIT_ALL_WARNINGS
GCC_WARN_PEDANTIC
GCC_TREAT_WARNINGS_AS_ERRORS
GCC_WARN_CHECK_SWITCH_STATEMENTS
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS
CLANG_WARN_EMPTY_BODY
GCC_WARN_FOUR_CHARACTER_CONSTANTS
GCC_WARN_SHADOW
CLANG_WARN_CONSTANT_CONVERSION
GCC_WARN_64_TO_32_BIT_CONVERSION
CLANG_WARN_ENUM_CONVERSION
CLANG_WARN_INT_CONVERSION
CLANG_WARN_IMPLICIT_SIGN_CONVERSION
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED
GCC_WARN_ABOUT_RETURN_TYPE
GCC_WARN_MISSING_PARENTHESES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS
GCC_WARN_ABOUT_MISSING_PROTOTYPES
GCC_WARN_ABOUT_MISSING_NEWLINE
WARNING_CFLAGS
GCC_WARN_ABOUT_POINTER_SIGNEDNESS
GCC_WARN_SIGN_COMPARE
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF
GCC_WARN_UNINITIALIZED_AUTOS
GCC_WARN_UNKNOWN_PRAGMAS
GCC_WARN_UNUSED_FUNCTION
GCC_WARN_UNUSED_LABEL
GCC_WARN_UNUSED_PARAMETER
GCC_WARN_UNUSED_VALUE
GCC_WARN_UNUSED_VARIABLE
CLANG_WARN__EXIT_TIME_DESTRUCTORS
GCC_WARN_NON_VIRTUAL_DESTRUCTOR
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO
CLANG_WARN_CXX0X_EXTENSIONS
CLANG_WARN__DUPLICATE_METHOD_MATCH
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS
GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS
CLANG_WARN_OBJC_RECEIVER_WEAK
GCC_WARN_STRICT_SELECTOR_MATCH
GCC_WARN_UNDECLARED_SELECTOR
CLANG_WARN__ARC_BRIDGE_CAST_NONARC
OTHER_OSACOMPILEFLAGS
OSACOMPILE_EXECUTE_ONLY
CLANG_ANALYZER_DEADCODE_DEADSTORES
CLANG_ANALYZER_GCD
CLANG_ANALYZER_MALLOC
CLANG_ANALYZER_OBJC_ATSYNC
CLANG_ANALYZER_OBJC_NSCFERROR
CLANG_ANALYZER_OBJC_INCOMP_METHOD_TYPES
CLANG_ANALYZER_OBJC_CFNUMBER
CLANG_ANALYZER_OBJC_COLLECTIONS
CLANG_ANALYZER_OBJC_UNUSED_IVARS
CLANG_ANALYZER_OBJC_SELF_INIT
CLANG_ANALYZER_OBJC_RETAIN_COUNT
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER
CLANG_ANALYZER_SECURITY_KEYCHAIN_API
CLANG_ANALYZER_SECURITY_INSECUREAPI_UNCHECKEDRETURN
CLANG_ANALYZER_SECURITY_INSECUREAPI_GETPW_GETS
CLANG_ANALYZER_SECURITY_INSECUREAPI_MKSTEMP
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY
CLANG_ANALYZER_SECURITY_INSECUREAPI_VFORK
Code :
void ex6(int i, char** argv){
Mat test, test2;
test2 = imread(argv[i],CV_LOAD_IMAGE_COLOR);
}
//
int main(int argc, char** argv){
//IplImage* img = cvLoadImage(argv[1]); // all IplImage pointers may be shown in a cvShowImage function call.
//ex1(img);
//img = cvLoadImage(argv[1]); // necessary to re-allocated to prevent null pointer error.
//ex2(img);
//img = cvLoadImage(argv[1]); // necessary to re-allocated to prevent null pointer error.
//ex3(img);
//img = cvLoadImage(argv[1]);
//ex4(argc, argv);
string s(argv[1]);
ex6(argc,argv);
return 0;
}
I managed to solve my own problem by process of elimination.
http://petercodes.wordpress.com/2013/09/09/resolving-linking-errors-in-opencv-for-an-osx-install/

Resources