Thanks 
Frese . I linked vtk debug version to debug-compiled app and release version to release-compiled app and now it is working fine.<div>Thanks again.<br><br><div class="gmail_quote">On Mon, Mar 19, 2012 at 5:34 PM, Frese Daniel Dr. <span dir="ltr">&lt;<a href="mailto:frese@heidenhain.de">frese@heidenhain.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="DE" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">some time ago I had the same/very similar issues (setting axis title in a chart); just can’t find the exact mailing list reference right now.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">The point is, that mixing release/debug stuff with Microsoft Visual Studio is always unsafe and not recommended (the Microsoft docs explicitly advise you not to do it). There is no guarantee that stuff will work properly. For some reason though, it works kind of OK for most of VTK (although as said, use it at your own risk), but in particular some of the vtkChartXY stuff is failing explicitly (i.e. it throws exceptions). As said, this should not be considered a failure on the vtk side, but is rather due to incorrect linking.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">The only viable solution is to rebuild vtk also in debug mode and link the debug version of vtk to your debug-compiled app, and the release compiled version of vtk to your release-compiled app. After this I had now more trouble with stuff like this.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Daniel<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">Von:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a> [mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] <b>Im Auftrag von </b>Gishara Indeewarie<br>
<b>Gesendet:</b> Montag, 19. März 2012 12:42<br><b>An:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br><b>Betreff:</b> [vtkusers] Setting the axis titles in vtkChartXY<u></u><u></u></span></p>
</div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi all,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I am using vtkChartXY in my application according to the example (<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot</a>).<u></u><u></u></p>
</div><div><p class="MsoNormal">It was working well, but as long as I set the x and y axis labels (instead of default names as X-Axis and Y-Axis) I am getting an exception.<u></u><u></u></p></div><div><p class="MsoNormal">
eg: <u></u><u></u></p></div><div><p class="MsoNormal">chart-&gt;GetAxis(vtkAxis::BOTTOM)-&gt;SetTitle(&quot;distance &quot;);<u></u><u></u></p></div><div><p class="MsoNormal">I am using VTK built in release mode.And the program works well if I run it in release mode.<u></u><u></u></p>
</div><div><p class="MsoNormal">But when I run it in debug mode, it gives an exception. <u></u><u></u></p></div><div><p class="MsoNormal">What should I do to make it work in debug mode as well?<u></u><u></u></p></div><div>
<p class="MsoNormal">I am using visual c++ in visual studio 2008.<u></u><u></u></p></div><div><p class="MsoNormal">Thanks.<u></u><u></u></p></div></div></div></div><p>
------------------------------------------------------------------------------------------------------ <br>
Registergericht: Traunstein / Registry Court: HRB 275 - Sitz / Head Office: Traunreut <br>
Aufsichtsratsvorsitzender / Chairman of Supervisory Board: Rainer Burkhard <br>
Geschäftsführung / Management Board: Thomas Sesselmann (Vorsitzender / Chairman),<br>
Michael Grimm, Matthias Fauser, Sebastian Tondorf<br><br>
<a href="http://www.heidenhain.de/disclaimer" target="_blank">E-Mail Haftungsausschluss / E-Mail Disclaimer</a><br></p></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div></div><font color="#666666">Gish</font><br>

</div>