[Insight-users] conencted componentimage filter build errror

Luis Ibanez luis.ibanez at kitware.com
Sat Dec 10 10:30:26 EST 2005


   Hi Ilker,

   The error message from your linker
   is telling you what the problem is:

  "external symbol _main referenced in function _mainCRTStartup"



   You don't have a "main()" function in your code.



   The reason is that you took code from a Test, where we don't
   use "main()" because the "main()" function is in the test
   driver that collects a groups of tests.


   The solution to your problem is to replace the function
   name:


          ConfidenceConenctedImageFilterTest()


   in the file ConfidenceConenctedImageFilterTest.cxx with


                         main()





   You may find useful to read an introductory book
   to C++ before you continue your journey with ITK.




    Regards,



       Luis



----------------------
ilker hacıhaliloğlu wrote:
> hi all
> i want to make the selection of seed points in fastmarching method fully 
> automated. I have read from one of the emails posted in the itk mailing list
> one possible solution for this is .
> 1-Running manually the Confidence conneceted filter and getting the mean 
> and variance values for figuring out the intesity values.
> 2- By using this intensity values threshold the image and computer the 
> conencted component and take the two largest ones.
> what i did is . ue confidenceconnected segmentation algorithm to get 
> mean and varaince values also a segmented image . After that i tried to use
> confidencesonenctedimagefiltertest.cxx .  to compute the connected 
> components and then will use the relablecomponentimagefilter.
>  
> Right now my problem is if i run my program for the computing the 
> connected components i get an error like
> 'itkConfidenceConnectedImageFilterTest error LNK2019: unresolved 
> external symbol _main referenced in function _mainCRTStartup
> itkConfidenceConnectedImageFilterTest fatal error LNK1120: 1 unresolved 
> externals
>  
> my cmakelists looks like this
>  
> 
> PROJECT(itkConfidenceConnectedImageFilterTest)
> 
> FIND_PACKAGE ( ITK )
> IF ( ITK_FOUND )
>          INCLUDE( ${USE_ITK_FILE} )
> ENDIF( ITK_FOUND )
> 
> 
> ADD_EXECUTABLE(itkConfidenceConnectedImageFilterTest 
> itkConfidenceConnectedImageFilterTest.cxx )
> TARGET_LINK_LIBRARIES( itkConfidenceConnectedImageFilterTest ITKCommon 
> ITKIO ITKNumerics ITKStatistics ITKBasicFilters)
> 
>  
>  
>  
> whaty am i doing wrong? I would be very happy if you guys can help me
>  
> Cheers
> ilker
>  
>  
>  
>  
>  
>  
>  
> ------------------------------------------------------------------
> 
> '.....ich möchte mir eine ader öffnen, die mir die ewige freiheit 
> schaffte....'
> 
> --------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list