compiling on Visual C++

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


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
#    define OPENSLIDE_PUBLIC()  extern "C" __declspec(dllexport)
#  else
#ifdef __cplusplus
#    define OPENSLIDE_PUBLIC() extern "C" __declspec(dllimport)
#    define OPENSLIDE_PUBLIC() __declspec(dllimport)

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...

More information about the openslide-users mailing list