diff --git a/CMakeLists.txt b/CMakeLists.txt index 915d80d..cf5034c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ if (NOT DEFINED CMAKE_C_STANDARD) set(CMAKE_C_STANDARD 99) endif() -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS ON) @@ -77,8 +76,8 @@ target_compile_definitions( replxx PUBLIC $<$>:REPLXX_STATIC> - $<$:REPLXX_BUILDING_DLL> PRIVATE + $<$:REPLXX_BUILDING_DLL> $<$:_CRT_SECURE_NO_WARNINGS=1 /ignore:4503> ) target_compile_options( diff --git a/include/replxx.h b/include/replxx.h index b02baa3..4ac6725 100644 --- a/include/replxx.h +++ b/include/replxx.h @@ -461,7 +461,7 @@ REPLXX_IMPEXP void replxx_bind_key( Replxx*, int code, key_press_handler_t handl * \param actionName - name of internal action to be invoked on key press. * \return -1 if invalid action name was used, 0 otherwise. */ -int replxx_bind_key_internal( Replxx*, int code, char const* actionName ); +REPLXX_IMPEXP int replxx_bind_key_internal( Replxx*, int code, char const* actionName ); REPLXX_IMPEXP void replxx_set_preload_buffer( Replxx*, const char* preloadText ); @@ -584,7 +584,7 @@ REPLXX_IMPEXP int replxx_history_load( Replxx*, const char* filename ); REPLXX_IMPEXP void replxx_history_clear( Replxx* ); REPLXX_IMPEXP void replxx_clear_screen( Replxx* ); #ifdef __REPLXX_DEBUG__ -void replxx_debug_dump_print_codes(void); +REPLXX_IMPEXP void replxx_debug_dump_print_codes(void); #endif /* the following is extension to the original linenoise API */ REPLXX_IMPEXP int replxx_install_window_change_handler( Replxx* ); @@ -599,35 +599,35 @@ REPLXX_IMPEXP void replxx_disable_bracketed_paste( Replxx* ); * \param color2 - second input color. * \return A new color definition that represent combined input colors. */ -ReplxxColor replxx_color_combine( ReplxxColor color1, ReplxxColor color2 ); +REPLXX_IMPEXP ReplxxColor replxx_color_combine( ReplxxColor color1, ReplxxColor color2 ); /*! \brief Transform foreground color definition into a background color definition. * * \param color - an input foreground color definition. * \return A background color definition that is a transformed input \e color. */ -ReplxxColor replxx_color_bg( ReplxxColor color ); +REPLXX_IMPEXP ReplxxColor replxx_color_bg( ReplxxColor color ); /*! \brief Add `bold` attribute to color definition. * * \param color - an input color definition. * \return A new color definition with bold attribute set. */ -ReplxxColor replxx_color_bold( ReplxxColor color ); +REPLXX_IMPEXP ReplxxColor replxx_color_bold( ReplxxColor color ); /*! \brief Add `underline` attribute to color definition. * * \param color - an input color definition. * \return A new color definition with underline attribute set. */ -ReplxxColor replxx_color_underline( ReplxxColor color ); +REPLXX_IMPEXP ReplxxColor replxx_color_underline( ReplxxColor color ); /*! \brief Create a new grayscale color of given brightness level. * * \param level - a brightness level for new color, must be between 0 (darkest) and 23 (brightest). * \return A new grayscale color of a given brightest \e level. */ -ReplxxColor replxx_color_grayscale( int level ); +REPLXX_IMPEXP ReplxxColor replxx_color_grayscale( int level ); /*! \brief Create a new color in 6×6×6 RGB color space from base component levels. * @@ -636,7 +636,7 @@ ReplxxColor replxx_color_grayscale( int level ); * \param blue - a blue (of RGB) component level, must be 0 and 5. * \return A new color in 6×6×6 RGB color space. */ -ReplxxColor replxx_color_rgb666( int red, int green, int blue ); +REPLXX_IMPEXP ReplxxColor replxx_color_rgb666( int red, int green, int blue ); #ifdef __cplusplus } diff --git a/include/replxx.hxx b/include/replxx.hxx index 4928cb2..532329d 100644 --- a/include/replxx.hxx +++ b/include/replxx.hxx @@ -260,7 +260,7 @@ public: } }; class HistoryScanImpl; - class HistoryScan { + class REPLXX_IMPEXP HistoryScan { public: typedef std::unique_ptr impl_t; private: @@ -663,35 +663,35 @@ namespace color { * \param color2 - second input color. * \return A new color definition that represent combined input colors. */ -Replxx::Color operator | ( Replxx::Color color1, Replxx::Color color2 ); +REPLXX_IMPEXP Replxx::Color operator | ( Replxx::Color color1, Replxx::Color color2 ); /*! \brief Transform foreground color definition into a background color definition. * * \param color - an input foreground color definition. * \return A background color definition that is a transformed input \e color. */ -Replxx::Color bg( Replxx::Color color ); +REPLXX_IMPEXP Replxx::Color bg( Replxx::Color color ); /*! \brief Add `bold` attribute to color definition. * * \param color - an input color definition. * \return A new color definition with bold attribute set. */ -Replxx::Color bold( Replxx::Color color ); +REPLXX_IMPEXP Replxx::Color bold( Replxx::Color color ); /*! \brief Add `underline` attribute to color definition. * * \param color - an input color definition. * \return A new color definition with underline attribute set. */ -Replxx::Color underline( Replxx::Color color ); +REPLXX_IMPEXP Replxx::Color underline( Replxx::Color color ); /*! \brief Create a new grayscale color of given brightness level. * * \param level - a brightness level for new color, must be between 0 (darkest) and 23 (brightest). * \return A new grayscale color of a given brightest \e level. */ -Replxx::Color grayscale( int level ); +REPLXX_IMPEXP Replxx::Color grayscale( int level ); /*! \brief Create a new color in 6×6×6 RGB color space from base component levels. * @@ -700,7 +700,7 @@ Replxx::Color grayscale( int level ); * \param blue - a blue (of RGB) component level, must be 0 and 5. * \return A new color in 6×6×6 RGB color space. */ -Replxx::Color rgb666( int red, int green, int blue ); +REPLXX_IMPEXP Replxx::Color rgb666( int red, int green, int blue ); }