<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Dear OpenSlide People,
<div class=""><br class="">
</div>
<div class="">for Java and Python, there are hello world examples how to use openSlide.</div>
<div class=""><br class="">
</div>
<div class="">But for C++, I had a hard time to find such a script, which e.g. creates a openSlide object, reads a .SVS file and outputs the SVS info in the console.</div>
<div class=""><br class="">
</div>
<div class="">Is there anybody who has that and likes to share?</div>
<div class=""><br class="">
</div>
<div class="">I tried following code, but it constantly gives errors:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; min-height: 11px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; color: rgb(180, 38, 26);" class="">
<span style="color: #929292" class="">#include</span><span style="color: #000000" class="">
</span>"stdafx.h"</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; color: rgb(180, 38, 26);" class="">
<span style="color: #929292" class="">#include</span><span style="color: #000000" class="">
</span><iostream></div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; color: rgb(180, 38, 26);" class="">
<span style="color: #929292" class="">#include</span><span style="color: #000000" class="">
</span><sys/stat.h></div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; color: rgb(146, 146, 146);" class="">
#include<span style="color: #000000" class=""> </span><span style="color: #b4261a" class=""><string></span></div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; color: rgb(180, 38, 26);" class="">
<span style="color: #929292" class="">#include</span><span style="color: #000000" class="">
</span>"../../../../../Downloads/openslide-win64-20150527/openslide-win64-20150527/include/openslide/openslide.h"</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; color: rgb(132, 33, 156);" class="">
<span style="font-size: 9.5px; color: rgb(146, 146, 146);" class="">#include</span><span style="font-size: 9.5px; color: rgb(0, 0, 0);" class="">
</span><span style="color: rgb(180, 38, 26); font-size: 9.5px;" class=""><stdio.h></span></div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; color: rgb(146, 146, 146);" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; color: rgb(4, 51, 255);" class="">
using<span style="color: #000000" class=""> </span>namespace<span style="color: #000000" class=""> std;</span></div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; min-height: 11px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; min-height: 11px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
<span style="font-size: 9.5px; color: rgb(4, 51, 255);" class="">int</span><span style="font-size: 9.5px;" class=""> main()</span></div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
{</div>
<div style="margin: 0px; line-height: normal;" class=""><span style="color: rgb(0, 0, 0); font-family: Consolas; font-size: 9.5px;" class=""><span class="Apple-tab-span" style="white-space:pre"></span></span><span style="color: rgb(4, 51, 255); font-family: Consolas; font-size: 9.5px;" class="">const</span><span style="color: rgb(0, 0, 0); font-family: Consolas; font-size: 9.5px;" class="">
</span><span style="color: rgb(4, 51, 255); font-family: Consolas; font-size: 9.5px;" class="">char</span><span style="color: rgb(0, 0, 0); font-family: Consolas; font-size: 9.5px;" class=""> *filename =
</span><span style="color: rgb(180, 38, 26); font-family: Consolas; font-size: 9.5px;" class="">"CMU-1.svs</span><font color="#b4261a" face="Consolas" size="1" class="">“</font><font face="Consolas" class=""><span style="font-size: 9.5px;" class="">; // file
exists</span></font></div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
<span class="Apple-tab-span" style="white-space:pre"></span><span style="color: #33a2bd" class="">openslide_t</span>* osr = openslide_open(filename);</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; min-height: 11px;" class="">
<br class="">
</div>
<p style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; min-height: 11px;" class="">
<span class="Apple-tab-span" style="white-space:pre"></span><br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
<span class="Apple-tab-span" style="white-space:pre"></span>openslide_close(osr);</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas; min-height: 11px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
<span class="Apple-tab-span" style="white-space:pre"></span><span style="color: rgb(4, 51, 255); font-size: 9.5px;" class="">return</span><span style="font-size: 9.5px;" class=""> 0;</span></div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
}</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">The error is:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp_openslide_open" in Funktion "main".</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp_openslide_close" in Funktion "main“.</div>
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
It translates to </div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
error LNK2019: Reference to unresolved external symbol … in function main.</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
I think I have to include some dll, but I dont have a clue which and how. I am using Visual Studio 2015 and the latest openSlide ( openslide-win64-20150527 ). Or shoud I use the openslide-3.4.1 download?</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
Thank you very much!!</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
Best,</div>
<div style="margin: 0px; font-size: 9.5px; line-height: normal; font-family: Consolas;" class="">
Peter</div>
<P>=====================================================================<br/>
<br/>
Please note that this e-mail and any files transmitted from<br/>
Memorial Sloan Kettering Cancer Center may be privileged, confidential,<br/>
and protected from disclosure under applicable law. If the reader of<br/>
this message is not the intended recipient, or an employee or agent<br/>
responsible for delivering this message to the intended recipient,<br/>
you are hereby notified that any reading, dissemination, distribution,<br/>
copying, or other use of this communication or any of its attachments<br/>
is strictly prohibited. If you have received this communication in<br/>
error, please notify the sender immediately by replying to this message<br/>
and deleting this message, any attachments, and all copies and backups<br/>
from your computer.<br/></P></body>
</html>