added DLL export macro for exporting symbols in VS2017
This commit is contained in:
parent
256cf494a3
commit
3282e464a1
@ -52,7 +52,7 @@ extern "C" {
|
||||
VIPS_NAMESPACE_START
|
||||
|
||||
// Wrapper over im_col_display with ref counting
|
||||
class VDisplay {
|
||||
class VIPS_CC_API VDisplay {
|
||||
struct refblock {
|
||||
im_col_display *disp; // im_col_display struct
|
||||
im_col_tab_disp *luts; // luts built from this display
|
||||
|
@ -49,7 +49,7 @@
|
||||
VIPS_NAMESPACE_START
|
||||
|
||||
// Error type
|
||||
class VError : public std::exception {
|
||||
class VIPS_CC_API VError : public std::exception {
|
||||
std::string _what;
|
||||
|
||||
public:
|
||||
@ -76,7 +76,7 @@ inline std::ostream &operator<<( std::ostream &file, const VError &err )
|
||||
return( file );
|
||||
}
|
||||
|
||||
void verror( std::string str = "" );
|
||||
void VIPS_CC_API verror( std::string str = "" );
|
||||
|
||||
VIPS_NAMESPACE_END
|
||||
|
||||
|
@ -77,7 +77,7 @@ typedef int (*VCallback)( void *, void * );
|
||||
* and several other refblocks can have IMAGEs which depend upon this IMAGE
|
||||
* for their result.
|
||||
*/
|
||||
class VImage {
|
||||
class VIPS_CC_API VImage {
|
||||
/* We'd like this to be protected so that user subclasses can define
|
||||
* their own member wrappers. But sadly C++ doesn't work like that:
|
||||
* subclasses of VImage can only refer to protected members via
|
||||
@ -89,7 +89,7 @@ public:
|
||||
*/
|
||||
#ifndef SWIG
|
||||
// Count ref etc. in one of these. One for each open VIPS image.
|
||||
struct refblock {
|
||||
VIPS_CC_API struct refblock {
|
||||
_VipsImage *im; // IMAGE pointer
|
||||
int close_on_delete; // Set if we must im_close()
|
||||
int nrefs; // Number of refs to us
|
||||
@ -100,7 +100,7 @@ public:
|
||||
virtual ~refblock();
|
||||
|
||||
// Add a ref - this (output image) depends upon IMAGE in
|
||||
void addref( refblock *in );
|
||||
VIPS_CC_API void addref( refblock *in );
|
||||
|
||||
// Remove a ref
|
||||
void removeref();
|
||||
@ -420,7 +420,7 @@ public:
|
||||
* be part of the public API in case people subclass VImage and add their own
|
||||
* members.
|
||||
*/
|
||||
class Vargv {
|
||||
class VIPS_CC_API Vargv {
|
||||
// Function we are args to
|
||||
im__function *fn;
|
||||
|
||||
|
@ -73,7 +73,7 @@ union MASKUNION {
|
||||
};
|
||||
|
||||
// Private wrapper over *MASK - user does not see this
|
||||
class VPMask {
|
||||
class VIPS_CC_API VPMask {
|
||||
friend class VMask;
|
||||
|
||||
public:
|
||||
@ -102,7 +102,7 @@ public:
|
||||
};
|
||||
|
||||
// Specialise for INTMASK
|
||||
class VPIMask : public VPMask {
|
||||
class VIPS_CC_API VPIMask : public VPMask {
|
||||
public:
|
||||
VPIMask( int xsize, int ysize );
|
||||
VPIMask( int xsize, int ysize, int scale, int offset,
|
||||
@ -129,7 +129,7 @@ public:
|
||||
};
|
||||
|
||||
// Specialise for DOUBLEMASK
|
||||
class VPDMask : public VPMask {
|
||||
class VIPS_CC_API VPDMask : public VPMask {
|
||||
public:
|
||||
VPDMask( int xsize, int ysize );
|
||||
VPDMask( int xsize, int ysize,
|
||||
@ -167,7 +167,7 @@ inline std::ostream &operator<<( std::ostream &file,
|
||||
#endif /*!SWIG*/
|
||||
|
||||
// Wrapper over VP?Mask with ref counting
|
||||
class VMask {
|
||||
class VIPS_CC_API VMask {
|
||||
protected:
|
||||
struct refblock {
|
||||
_private_detail::VPMask *pmask; // Mask: double or int
|
||||
@ -221,11 +221,11 @@ inline std::ostream &operator<<( std::ostream &file, const VMask &msk )
|
||||
}
|
||||
|
||||
// Need to forward ref these
|
||||
class VDMask;
|
||||
class VImage;
|
||||
class VIPS_CC_API VDMask;
|
||||
class VIPS_CC_API VImage;
|
||||
|
||||
// Wrapper over _private_detail::VPIMask with ref counting
|
||||
class VIMask : public VMask {
|
||||
class VIPS_CC_API VIMask : public VMask {
|
||||
public:
|
||||
VIMask( int xsize, int ysize )
|
||||
{
|
||||
@ -314,7 +314,7 @@ public:
|
||||
};
|
||||
|
||||
// Wrapper over _private_detail::VPDMask with ref counting
|
||||
class VDMask : public VMask {
|
||||
class VIPS_CC_API VDMask : public VMask {
|
||||
public:
|
||||
VDMask( int xsize, int ysize )
|
||||
{
|
||||
|
@ -35,6 +35,18 @@
|
||||
// VImage.h uses GValue for metadata
|
||||
#include <glib-object.h>
|
||||
|
||||
/* Define VIPS_CC_EXPORTS to build a DLL using MSVC.
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
# ifdef VIPS_CC_EXPORTS
|
||||
# define VIPS_CC_API __declspec(dllexport)
|
||||
# else
|
||||
# define VIPS_CC_API __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define VIPS_CC_API
|
||||
#endif
|
||||
|
||||
// If we have already #included the C vips headers, we have to undef a load of
|
||||
// stuff to stop vips's stupid macros messing up our enums
|
||||
#ifdef IM_VIPS_H
|
||||
|
Loading…
Reference in New Issue
Block a user