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