<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<pre>To answer my own question. You need to use the linker option /OPT:NOREF (linker->optimisation->References in the GUI settings), which means uncalled references are not optimised out of the code. Presumably openslide is doing something clever with pointers to functions or something that the microsoft optimiser breaks. Looking at discussions on this subject elsewhere on the net the "correct/best" solution is to use <font color="#0000ff" size="2"> #pragma</font><font size="2"> </font><font color="#0000ff" size="2">comment</font><font size="2">(linker, </font><font color="#800000" size="2">"/include:....</font><font size="2">) in the source of openslide (or whatever dependency is breaking). I'll leave that to the developers to consider as there is an easy workaround.
Derek
</font>
> Hi,
>
> I'm trying to get the simple program below compiled using microsoft
> visual c++ from the command line. It works fine with debug information
> included (/Zi), but with this omitted the program links, but crashes at
> runtime. I'm using the latest windows 64bit precompiled binaries on
> windows 7, MSVC 2010. Any thoughts? I'm completely stuck.
>
>Thanks
>
> Derek</pre>
</body>
</html>