compiling on Visual C++

Tonny Studsgaard Petersen tsp at person.dk
Mon Apr 23 13:16:22 EDT 2012


Hi

Is the latest code on github supposed to be compatible with Visual C++
2010? Currently the code needs a few changes to compile mainly due to the c
compiler not being compliant to C99. This means a lot of the variable
definitions needs to be moved to the top of the function in
openslide-tools-common.c and openslide-write-png.c.
 I also had to change the _OPENSLIDE_BUILDING_DLL define in
openslide-features.h to:

#if defined _WIN32
#  ifdef _OPENSLIDE_BUILDING_DLL
#    define OPENSLIDE_PUBLIC()  extern "C" __declspec(dllexport)
#  else
#ifdef __cplusplus
#    define OPENSLIDE_PUBLIC() extern "C" __declspec(dllimport)
#else
#    define OPENSLIDE_PUBLIC() __declspec(dllimport)
#endif
#endif

to avoid the c++ name mangling in the exported functions in openslide.dll.

Best regards,

Tonny Petersen, M.D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20120423/823e3319/attachment.html 


More information about the openslide-users mailing list