[vtkusers] vtkSeedWidget

Ken Urish ken.urish at gmail.com
Thu Apr 17 13:46:09 EDT 2008


Ok it all works!

For archive purposes, the original problem was that I had a bad cvs build.
The first time I updated cvs and rebuilt, I got the same error.
The second time I updated cvs and rebuilt-built vtk the initial
linking error went away. This gave me the new linking error that I did
not have the "main" function. Two seconds after I sent the last email
I realized my bone head mistake. Appreciate the help.

Thanks
--Ken--

On Thu, Apr 17, 2008 at 1:08 PM, David Cole <david.cole at kitware.com> wrote:
> This link error (which is different from the one you started this thread
> with) means you have no C++ "main" function in your EdgeDetect.cxx file.
>
> Do you have a "main"?
>
>
>
>
>  On Thu, Apr 17, 2008 at 1:03 PM, Ken Urish <ken.urish at gmail.com> wrote:
> > Ok
> >
> >
> > 1. I have tried running test and example files on multiple widgets
> > (seed, contour, plane, spline) using the latest (8am today) cvs update
> > and vtk 5.0.4. I get two link error messages:
> >
> > a) EdgeDetect error LNK2019: unresolved external symbol _main
> > referenced in function _mainCRTStartup
> > b) EdgeDetect fatal error LNK1120: 1 unresolved externals
> >
> > 2. I can compile pretty much any other test file I want as long as its
> > not vtkWidget.
> >
> > 3. cMake file is below in this email thread.
> >
> > Help! I appreciate the assistance.
> >
> > Thanks
> > --Ken--
> >
> >
> >
> >
> >
> > On Thu, Apr 17, 2008 at 12:03 PM, Ken Urish <ken.urish at gmail.com> wrote:
> > > Sorry about that....
> > >  Yes, I have the vtkWidgets in the TARGET_LINK_LIBRARIES. Any thoughts?
> > >  This must be a overall widgets problem because ive tried three widget
> > >  test files and Im always getting those linking errors.
> > >
> > >  I appreciate the help.
> > >
> > >  Thanks
> > >  --Ken--
> > >
> > >
> > >  PROJECT( EdgeDetect )
> > >
> > >  FIND_PACKAGE ( ITK )
> > >  IF (  ITK_FOUND  )
> > >          INCLUDE(  ${USE_ITK_FILE}  )
> > >  ENDIF(   ITK_FOUND   )
> > >
> > >  FIND_PACKAGE ( VTK )
> > >  IF (   VTK_FOUND   )
> > >          INCLUDE(  ${USE_VTK_FILE}  )
> > >  ENDIF(   VTK_FOUND   )
> > >
> > >  INCLUDE_DIRECTORIES(${EdgeDetect_SOURCE_DIR})
> > >
> > >  ADD_EXECUTABLE( EdgeDetect   EdgeDetect.cxx )
> > >
> > >  TARGET_LINK_LIBRARIES (
> > >   EdgeDetect
> > >   ITKBasicFilters
> > >   ITKCommon
> > >   ITKIO
> > >   vtkRendering
> > >   vtkGraphics
> > >   vtkHybrid
> > >   vtkImaging
> > >   vtkIO
> > >   vtkFiltering
> > >   vtkCommon
> > >   vtkWidgets)
> > >
> > >
> > >
> > >
> > >  On Thu, Apr 17, 2008 at 11:45 AM, David Cole <david.cole at kitware.com>
> wrote:
> > >  > File below...? I think you forgot to paste/attach the CMake file.
> > >  >
> > >  > If you don't have it already, you need:
> > >  > TARGET_LINK_LIBRARIES(myExe vtkWidgets)
> > >  >
> > >  > ...in your CMakeLists.txt file to link to the vtkWidgets lib.
> > >  >
> > >  >
> > >  > (BTW, you're not wasting anybody's time here. We are all volunteer
> helpers
> > >  > on the list. Keep asking questions till you're satisfied.)
> > >  >
> > >  > HTH,
> > >  > David Cole
> > >  >
> > >  >
> > >  >
> > >  >
> > >  > On Thu, Apr 17, 2008 at 11:38 AM, Ken Urish <ken.urish at gmail.com>
> wrote:
> > >  >
> > >  > > My cMake (file below) has the vtkWidgets added with all the other
> vtk
> > >  > > stuff. I updated my cvs checkout of vtk this morning and rebuilt
> vtk.
> > >  > >
> > >  > > cMake is only asking for my vtk and itk directories.
> > >  > >
> > >  > > Its not a problem specific to vtkSeedWidget because I could not
> > >  > > compile test code for vtkContourWidget either.
> > >  > >
> > >  > > I added the widgets library file "widgets.lib" to my source
> directory
> > >  > > of the program code and this didnt help.
> > >  > >
> > >  > > Any thoughts? I know I am doing something really dumb and this is
> my
> > >  > > inexperience with vtk. I apologize for waisting everyone's time.
> > >  > >
> > >  > > Thanks
> > >  > > --Ken--
> > >  > >
> > >  > >
> > >  > > On Thu, Apr 17, 2008 at 6:26 AM, Michael Knopke
> <Michael.Knopke at gmx.de>
> > >  > wrote:
> > >  > > >
> > >  > > >
> > >  > > >
> > >  > > >
> > >  > >
> > >  > >
> > >  > >
> > >  > > > You probably forgot to add vtkWidgets.lib (or dll depending on
> your
> > >  > setting)
> > >  > > > to the library path…
> > >  > > >
> > >  > > >
> > >  > > >
> > >  > > > Regards,
> > >  > > >
> > >  > > > Michael
> > >  > > >
> > >  > > >
> > >  > > >
> > >  > > >
> > >  > >
> > >  > >
> > >  > >
> > >  > > > _______________________________________________
> > >  > > >  This is the private VTK discussion list.
> > >  > > >  Please keep messages on-topic. Check the FAQ at:
> > >  > > > http://www.vtk.org/Wiki/VTK_FAQ
> > >  > > >  Follow this link to subscribe/unsubscribe:
> > >  > > >  http://www.vtk.org/mailman/listinfo/vtkusers
> > >  > > >
> > >  > > >
> > >  > > _______________________________________________
> > >  > > This is the private VTK discussion list.
> > >  > > Please keep messages on-topic. Check the FAQ at:
> > >  > http://www.vtk.org/Wiki/VTK_FAQ
> > >  > > Follow this link to subscribe/unsubscribe:
> > >  > > http://www.vtk.org/mailman/listinfo/vtkusers
> > >  > >
> > >  >
> > >  >
> > >
> >
>
>



More information about the vtkusers mailing list