diff --git a/contrib/irrXML/CMakeLists.txt b/contrib/irrXML/CMakeLists.txt index ef3ce1478..7518e382a 100644 --- a/contrib/irrXML/CMakeLists.txt +++ b/contrib/irrXML/CMakeLists.txt @@ -13,7 +13,7 @@ if ( MSVC ) ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS ) endif ( MSVC ) -add_library(IrrXML ${IrrXML_SRCS}) +add_library(IrrXML SHARED ${IrrXML_SRCS}) set(IRRXML_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "IrrXML_Include" ) set(IRRXML_LIBRARY "IrrXML" CACHE INTERNAL "IrrXML" ) diff --git a/contrib/irrXML/irrXML.cpp b/contrib/irrXML/irrXML.cpp index 609d51359..5a4b04507 100644 --- a/contrib/irrXML/irrXML.cpp +++ b/contrib/irrXML/irrXML.cpp @@ -18,7 +18,7 @@ namespace io { //! Implementation of the file read callback for ordinary files -class CFileReadCallBack : public IFileReadCallBack +class IRRXML_API CFileReadCallBack : public IFileReadCallBack { public: diff --git a/contrib/irrXML/irrXML.h b/contrib/irrXML/irrXML.h index b51ddeb54..abf1e1869 100644 --- a/contrib/irrXML/irrXML.h +++ b/contrib/irrXML/irrXML.h @@ -7,6 +7,12 @@ #include +#ifdef _WIN32 +# define IRRXML_API __declspec(dllexport) +#else +# define IRRXML_API +#endif _WIN32 + /** \mainpage irrXML 1.2 API documentation
@@ -409,7 +415,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReader* createIrrXMLReader(const char* filename); + IRRXML_API IrrXMLReader* createIrrXMLReader(const char* filename); //! Creates an instance of an UFT-8 or ASCII character xml parser. /** This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can @@ -421,7 +427,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReader* createIrrXMLReader(FILE* file); + IRRXML_API IrrXMLReader* createIrrXMLReader(FILE* file); //! Creates an instance of an UFT-8 or ASCII character xml parser. /** This means that all character data will be returned in 8 bit ASCII or UTF-8. The file to read can @@ -434,7 +440,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReader* createIrrXMLReader(IFileReadCallBack* callback); + IRRXML_API IrrXMLReader* createIrrXMLReader(IFileReadCallBack* callback); //! Creates an instance of an UFT-16 xml parser. /** This means that @@ -446,7 +452,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReaderUTF16* createIrrXMLReaderUTF16(const char* filename); + IRRXML_API IrrXMLReaderUTF16* createIrrXMLReaderUTF16(const char* filename); //! Creates an instance of an UFT-16 xml parser. /** This means that all character data will be returned in UTF-16. The file to read can @@ -458,7 +464,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReaderUTF16* createIrrXMLReaderUTF16(FILE* file); + IRRXML_API IrrXMLReaderUTF16* createIrrXMLReaderUTF16(FILE* file); //! Creates an instance of an UFT-16 xml parser. /** This means that all character data will be returned in UTF-16. The file to read can @@ -471,7 +477,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReaderUTF16* createIrrXMLReaderUTF16(IFileReadCallBack* callback); + IRRXML_API IrrXMLReaderUTF16* createIrrXMLReaderUTF16(IFileReadCallBack* callback); //! Creates an instance of an UFT-32 xml parser. @@ -483,7 +489,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReaderUTF32* createIrrXMLReaderUTF32(const char* filename); + IRRXML_API IrrXMLReaderUTF32* createIrrXMLReaderUTF32(const char* filename); //! Creates an instance of an UFT-32 xml parser. /** This means that all character data will be returned in UTF-32. The file to read can @@ -495,7 +501,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReaderUTF32* createIrrXMLReaderUTF32(FILE* file); + IRRXML_API IrrXMLReaderUTF32* createIrrXMLReaderUTF32(FILE* file); //! Creates an instance of an UFT-32 xml parser. /** This means that @@ -509,7 +515,7 @@ namespace io \return Returns a pointer to the created xml parser. This pointer should be deleted using 'delete' after no longer needed. Returns 0 if an error occured and the file could not be opened. */ - IrrXMLReaderUTF32* createIrrXMLReaderUTF32(IFileReadCallBack* callback); + IRRXML_API IrrXMLReaderUTF32* createIrrXMLReaderUTF32(IFileReadCallBack* callback); /*! \file irrxml.h