Compiling With Microsoft Compiler

Derek Magee D.R.Magee at leeds.ac.uk
Wed Apr 3 07:55:42 EDT 2013


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  #pragma  comment(linker,"/include:....) 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

> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20130403/c544e745/attachment.html 


More information about the openslide-users mailing list