This link error (which is different from the one you started this thread with) means you have no C++ &quot;main&quot; function in your EdgeDetect.cxx file.<br><br>Do you have a &quot;main&quot;?<br><br><br><div class="gmail_quote">
On Thu, Apr 17, 2008 at 1:03 PM, Ken Urish &lt;<a href="mailto:ken.urish@gmail.com">ken.urish@gmail.com</a>&gt; 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 &lt;<a href="mailto:ken.urish@gmail.com">ken.urish@gmail.com</a>&gt; wrote:<br>
&gt; Sorry about that....<br>
&gt; &nbsp;Yes, I have the vtkWidgets in the TARGET_LINK_LIBRARIES. Any thoughts?<br>
&gt; &nbsp;This must be a overall widgets problem because ive tried three widget<br>
&gt; &nbsp;test files and Im always getting those linking errors.<br>
&gt;<br>
&gt; &nbsp;I appreciate the help.<br>
&gt;<br>
&gt; &nbsp;Thanks<br>
&gt; &nbsp;--Ken--<br>
&gt;<br>
&gt;<br>
&gt; &nbsp;PROJECT( EdgeDetect )<br>
&gt;<br>
&gt; &nbsp;FIND_PACKAGE ( ITK )<br>
&gt; &nbsp;IF ( &nbsp;ITK_FOUND &nbsp;)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE( &nbsp;${USE_ITK_FILE} &nbsp;)<br>
&gt; &nbsp;ENDIF( &nbsp; ITK_FOUND &nbsp; )<br>
&gt;<br>
&gt; &nbsp;FIND_PACKAGE ( VTK )<br>
&gt; &nbsp;IF ( &nbsp; VTK_FOUND &nbsp; )<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INCLUDE( &nbsp;${USE_VTK_FILE} &nbsp;)<br>
&gt; &nbsp;ENDIF( &nbsp; VTK_FOUND &nbsp; )<br>
&gt;<br>
&gt; &nbsp;INCLUDE_DIRECTORIES(${EdgeDetect_SOURCE_DIR})<br>
&gt;<br>
&gt; &nbsp;ADD_EXECUTABLE( EdgeDetect &nbsp; EdgeDetect.cxx )<br>
&gt;<br>
&gt; &nbsp;TARGET_LINK_LIBRARIES (<br>
&gt; &nbsp; EdgeDetect<br>
&gt; &nbsp; ITKBasicFilters<br>
&gt; &nbsp; ITKCommon<br>
&gt; &nbsp; ITKIO<br>
&gt; &nbsp; vtkRendering<br>
&gt; &nbsp; vtkGraphics<br>
&gt; &nbsp; vtkHybrid<br>
&gt; &nbsp; vtkImaging<br>
&gt; &nbsp; vtkIO<br>
&gt; &nbsp; vtkFiltering<br>
&gt; &nbsp; vtkCommon<br>
&gt; &nbsp; vtkWidgets)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp;On Thu, Apr 17, 2008 at 11:45 AM, David Cole &lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt; wrote:<br>
&gt; &nbsp;&gt; File below...? I think you forgot to paste/attach the CMake file.<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt; If you don&#39;t have it already, you need:<br>
&gt; &nbsp;&gt; TARGET_LINK_LIBRARIES(myExe vtkWidgets)<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt; ...in your CMakeLists.txt file to link to the vtkWidgets lib.<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt; (BTW, you&#39;re not wasting anybody&#39;s time here. We are all volunteer helpers<br>
&gt; &nbsp;&gt; on the list. Keep asking questions till you&#39;re satisfied.)<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt; HTH,<br>
&gt; &nbsp;&gt; David Cole<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt; On Thu, Apr 17, 2008 at 11:38 AM, Ken Urish &lt;<a href="mailto:ken.urish@gmail.com">ken.urish@gmail.com</a>&gt; wrote:<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt; &gt; My cMake (file below) has the vtkWidgets added with all the other vtk<br>
&gt; &nbsp;&gt; &gt; stuff. I updated my cvs checkout of vtk this morning and rebuilt vtk.<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt; cMake is only asking for my vtk and itk directories.<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt; Its not a problem specific to vtkSeedWidget because I could not<br>
&gt; &nbsp;&gt; &gt; compile test code for vtkContourWidget either.<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt; I added the widgets library file &quot;widgets.lib&quot; to my source directory<br>
&gt; &nbsp;&gt; &gt; of the program code and this didnt help.<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt; Any thoughts? I know I am doing something really dumb and this is my<br>
&gt; &nbsp;&gt; &gt; inexperience with vtk. I apologize for waisting everyone&#39;s time.<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt; Thanks<br>
&gt; &nbsp;&gt; &gt; --Ken--<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt; On Thu, Apr 17, 2008 at 6:26 AM, Michael Knopke &lt;<a href="mailto:Michael.Knopke@gmx.de">Michael.Knopke@gmx.de</a>&gt;<br>
&gt; &nbsp;&gt; wrote:<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt; You probably forgot to add vtkWidgets.lib (or dll depending on your<br>
&gt; &nbsp;&gt; setting)<br>
&gt; &nbsp;&gt; &gt; &gt; to the library path…<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt; Regards,<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt; Michael<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt; _______________________________________________<br>
&gt; &nbsp;&gt; &gt; &gt; &nbsp;This is the private VTK discussion list.<br>
&gt; &nbsp;&gt; &gt; &gt; &nbsp;Please keep messages on-topic. Check the FAQ at:<br>
&gt; &nbsp;&gt; &gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt; &nbsp;&gt; &gt; &gt; &nbsp;Follow this link to subscribe/unsubscribe:<br>
&gt; &nbsp;&gt; &gt; &gt; &nbsp;<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; &gt;<br>
&gt; &nbsp;&gt; &gt; _______________________________________________<br>
&gt; &nbsp;&gt; &gt; This is the private VTK discussion list.<br>
&gt; &nbsp;&gt; &gt; Please keep messages on-topic. Check the FAQ at:<br>
&gt; &nbsp;&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt; &nbsp;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt; &nbsp;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt; &nbsp;&gt; &gt;<br>
&gt; &nbsp;&gt;<br>
&gt; &nbsp;&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>