Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50170 - in sandbox/guigl: boost/guigl boost/guigl/widget libs/guigl/build libs/guigl/build/xcodeide/guigl.xcodeproj libs/guigl/example
From: stipe_at_[hidden]
Date: 2008-12-07 02:24:38


Author: srajko
Date: 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
New Revision: 50170
URL: http://svn.boost.org/trac/boost/changeset/50170

Log:
example works with shared libraries
Added:
   sandbox/guigl/boost/guigl/export_symbols.hpp (contents, props changed)
Text files modified:
   sandbox/guigl/boost/guigl/application.hpp | 7 ++++---
   sandbox/guigl/boost/guigl/widget/button.hpp | 5 +++--
   sandbox/guigl/boost/guigl/widget/compound.hpp | 5 +++--
   sandbox/guigl/boost/guigl/widget/label.hpp | 5 +++--
   sandbox/guigl/boost/guigl/widget/labeled_button.hpp | 5 +++--
   sandbox/guigl/boost/guigl/widget/labeled_slider.hpp | 5 +++--
   sandbox/guigl/boost/guigl/widget/slider.hpp | 5 +++--
   sandbox/guigl/boost/guigl/widget/window.hpp | 6 +++---
   sandbox/guigl/boost/guigl/window.hpp | 5 +++--
   sandbox/guigl/libs/guigl/build/Jamfile | 10 ++--------
   sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj | 2 ++
   sandbox/guigl/libs/guigl/example/Jamfile | 10 ++++++++--
   12 files changed, 40 insertions(+), 30 deletions(-)

Modified: sandbox/guigl/boost/guigl/application.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/application.hpp (original)
+++ sandbox/guigl/boost/guigl/application.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -10,15 +10,16 @@
 #define BOOST__GUIGL__APPLICATION_HPP
 
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/signals.hpp>
 
 namespace boost { namespace guigl {
 
 class application {
 public:
- static void run();
- static boost::signal<void()> &on_idle();
- static void timeout(const boost::function<void()> &, unsigned milliseconds);
+ BOOST_EXPORT_SYMBOLS static void run();
+ BOOST_EXPORT_SYMBOLS static boost::signal<void()> &on_idle();
+ BOOST_EXPORT_SYMBOLS static void timeout(const boost::function<void()> &, unsigned milliseconds);
 };
 
 }}

Added: sandbox/guigl/boost/guigl/export_symbols.hpp
==============================================================================
--- (empty file)
+++ sandbox/guigl/boost/guigl/export_symbols.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -0,0 +1,24 @@
+/*=================================---------------------------------------------
+ Copyright 2008 Stjepan Rajko
+ Copyright 2007 Jeremy Pack
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------===============================*/
+
+
+#ifndef BOOST_EXPORT_SYMBOLS
+
+#if __GNUC__ >= 4
+# define BOOST_EXPORT_SYMBOLS __attribute__((visibility("default")))
+# define BOOST_IMPORT_SYMBOLS __attribute__((visibility("hidden")))
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(MSC_VER)
+# define BOOST_EXPORT_SYMBOLS __declspec(dllexport)
+# define BOOST_IMPORT_SYMBOLS __declspec(dllimport)
+#elif
+# define BOOST_EXPORT_SYMBOLS
+# define BOOST_IMPORT_SYMBOLS
+#endif
+
+#endif

Modified: sandbox/guigl/boost/guigl/widget/button.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/button.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/button.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -9,6 +9,7 @@
 #ifndef BOOST__GUIGL__WIDGET__BUTTON_HPP
 #define BOOST__GUIGL__WIDGET__BUTTON_HPP
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/guigl/view/active_colored.hpp>
 #include <boost/guigl/view/clickable.hpp>
 #include <boost/guigl/view/positioned.hpp>
@@ -47,8 +48,8 @@
     }
     boost::signal<void()> on_click;
 protected:
- BOOST_GUIGL_WIDGET_DRAW
- bool on_event(const event_type &event_info);
+ BOOST_EXPORT_SYMBOLS BOOST_GUIGL_WIDGET_DRAW
+ BOOST_EXPORT_SYMBOLS bool on_event(const event_type &event_info);
 
 private:
     void clickable_button_down(bool state);

Modified: sandbox/guigl/boost/guigl/widget/compound.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/compound.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/compound.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -9,6 +9,7 @@
 #ifndef BOOST__GUIGL__WIDGET__COMPOUND_HPP
 #define BOOST__GUIGL__WIDGET__COMPOUND_HPP
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/guigl/view/compound.hpp>
 #include <boost/guigl/view/positioned.hpp>
 #include <boost/guigl/view/solid_background.hpp>
@@ -33,8 +34,8 @@
     {}
 
 protected:
- void draw();
- bool on_event(const event_type &event_info);
+ BOOST_EXPORT_SYMBOLS void draw();
+ BOOST_EXPORT_SYMBOLS bool on_event(const event_type &event_info);
 };
 
 }}}

Modified: sandbox/guigl/boost/guigl/widget/label.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/label.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/label.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -9,6 +9,7 @@
 #ifndef BOOST__GUIGL__WIDGET__LABEL_HPP
 #define BOOST__GUIGL__WIDGET__LABEL_HPP
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/guigl/view/colored.hpp>
 #include <boost/guigl/view/labeled.hpp>
 #include <boost/guigl/view/solid_background.hpp>
@@ -33,8 +34,8 @@
     {}
 
 protected:
- void draw();
- bool on_event(const event_type &event_info);
+ BOOST_EXPORT_SYMBOLS void draw();
+ BOOST_EXPORT_SYMBOLS bool on_event(const event_type &event_info);
 
     friend class guigl::access;
 };

Modified: sandbox/guigl/boost/guigl/widget/labeled_button.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/labeled_button.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/labeled_button.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -9,6 +9,7 @@
 #ifndef BOOST__GUIGL__WIDGET__LABELED_BUTTON_HPP
 #define BOOST__GUIGL__WIDGET__LABELED_BUTTON_HPP
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/guigl/view/colored.hpp>
 #include <boost/guigl/view/labeled.hpp>
 #include <boost/guigl/widget/button.hpp>
@@ -34,8 +35,8 @@
     {}
 
 protected:
- void draw();
- bool on_event(const event_type &event_info);
+ BOOST_EXPORT_SYMBOLS void draw();
+ BOOST_EXPORT_SYMBOLS bool on_event(const event_type &event_info);
     friend class guigl::access;
 };
 

Modified: sandbox/guigl/boost/guigl/widget/labeled_slider.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/labeled_slider.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/labeled_slider.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -9,6 +9,7 @@
 #ifndef BOOST__GUIGL__WIDGET__LABELED_SLIDER_HPP
 #define BOOST__GUIGL__WIDGET__LABELED_SLIDER_HPP
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/guigl/view/colored.hpp>
 #include <boost/guigl/view/labeled.hpp>
 #include <boost/guigl/widget/slider.hpp>
@@ -30,8 +31,8 @@
     {}
 
 protected:
- void draw();
- bool on_event(const event_type &event_info);
+ BOOST_EXPORT_SYMBOLS void draw();
+ BOOST_EXPORT_SYMBOLS bool on_event(const event_type &event_info);
     friend class guigl::access;
 };
 

Modified: sandbox/guigl/boost/guigl/widget/slider.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/slider.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/slider.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -9,6 +9,7 @@
 #ifndef BOOST__GUIGL__WIDGET__SLIDER_HPP
 #define BOOST__GUIGL__WIDGET__SLIDER_HPP
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/guigl/view/active_colored.hpp>
 #include <boost/guigl/view/draggable.hpp>
 #include <boost/guigl/view/positioned.hpp>
@@ -48,8 +49,8 @@
     /// Sets the value of the slider.
     void set_value(double value);
 protected:
- BOOST_GUIGL_WIDGET_DRAW
- bool on_event(const event_type &event_info);
+ BOOST_EXPORT_SYMBOLS BOOST_GUIGL_WIDGET_DRAW
+ BOOST_EXPORT_SYMBOLS bool on_event(const event_type &event_info);
 
 private:
     double m_value;

Modified: sandbox/guigl/boost/guigl/widget/window.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/widget/window.hpp (original)
+++ sandbox/guigl/boost/guigl/widget/window.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -9,6 +9,7 @@
 #ifndef BOOST__GUIGL__WIDGET__WINDOW_HPP
 #define BOOST__GUIGL__WIDGET__WINDOW_HPP
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/guigl/view/compound.hpp>
 #include <boost/guigl/view/mouse_tracking.hpp>
 #include <boost/guigl/view/window.hpp>
@@ -31,9 +32,8 @@
     {}
     
 protected:
- void draw();
-
- bool on_event(const event_type &event_info);
+ BOOST_EXPORT_SYMBOLS void draw();
+ BOOST_EXPORT_SYMBOLS bool on_event(const event_type &event_info);
 };
 
 }}}

Modified: sandbox/guigl/boost/guigl/window.hpp
==============================================================================
--- sandbox/guigl/boost/guigl/window.hpp (original)
+++ sandbox/guigl/boost/guigl/window.hpp 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -10,6 +10,7 @@
 #define BOOST__GUIGL__WINDOW_HPP
 
 
+#include <boost/guigl/export_symbols.hpp>
 #include <boost/guigl/access.hpp>
 #include <boost/guigl/event.hpp>
 #include <boost/guigl/parameters.hpp>
@@ -32,8 +33,8 @@
     /// Constructor taking named parameters.
     /** \param args A pack of named parameters (accepts _label, _size, _position, _background).
     */
- window(const argument_pack_type &args);
- ~window();
+ BOOST_EXPORT_SYMBOLS window(const argument_pack_type &args);
+ BOOST_EXPORT_SYMBOLS ~window();
 
     static void redraw(const view::positioned<> &v);
     

Modified: sandbox/guigl/libs/guigl/build/Jamfile
==============================================================================
--- sandbox/guigl/libs/guigl/build/Jamfile (original)
+++ sandbox/guigl/libs/guigl/build/Jamfile 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -25,22 +25,16 @@
 feature.feature guigl_binding : glut fltk : propagated ;
 feature.set-default guigl_binding : glut ;
 
-lib boost_guigl_binding
- :
- [ obj binding_window_obj : window.cpp ]
- : <guigl_binding>fltk:<define>BOOST_GUIGL_USE_FLTK_GLUT
- ;
-
 SOURCES =
- window application
+ application
     widget/button widget/labeled_button
     widget/slider widget/labeled_slider
     widget/compound widget/label ;
 
 lib boost_guigl
     : $(SOURCES).cpp
+ [ obj binding_window_obj : window.cpp/<guigl_binding>fltk:<define>BOOST_GUIGL_USE_FLTK_GLUT ]
     [ obj widget_window_obj : widget/window.cpp ]
- : : : <library>boost_guigl_binding
     ;
 
 

Modified: sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj (original)
+++ sandbox/guigl/libs/guigl/build/xcodeide/guigl.xcodeproj/project.pbxproj 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -165,6 +165,7 @@
                 08B213E60EB91BF1006F0C30 /* geometry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = geometry.hpp; sourceTree = "<group>"; };
                 08B919780EB682BC00F743E3 /* delayed_constructor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = delayed_constructor.hpp; sourceTree = "<group>"; };
                 08B9197C0EB6885C00F743E3 /* test_delayed_constructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_delayed_constructor.cpp; sourceTree = "<group>"; };
+ 08CD92110EEB51120047AE90 /* export_symbols.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = export_symbols.hpp; sourceTree = "<group>"; };
                 08D0F2550E6712E90026C6DF /* active_colored.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = active_colored.hpp; sourceTree = "<group>"; };
                 08D0F25D0E67139E0026C6DF /* active_colored.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = active_colored.hpp; sourceTree = "<group>"; };
                 08D5606D0E52901F005A2391 /* window.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = window.cpp; sourceTree = "<group>"; };
@@ -350,6 +351,7 @@
                                 089791BA0E5DC06400C79062 /* event.hpp */,
                                 08B213E50EB91BD9006F0C30 /* draw.hpp */,
                                 08B213E60EB91BF1006F0C30 /* geometry.hpp */,
+ 08CD92110EEB51120047AE90 /* export_symbols.hpp */,
                         );
                         name = guigl;
                         path = ../../../../boost/guigl;

Modified: sandbox/guigl/libs/guigl/example/Jamfile
==============================================================================
--- sandbox/guigl/libs/guigl/example/Jamfile (original)
+++ sandbox/guigl/libs/guigl/example/Jamfile 2008-12-07 02:24:36 EST (Sun, 07 Dec 2008)
@@ -8,7 +8,13 @@
 
 project boost/guigl/example
     : requirements
- <library>$(TOP)/libs/guigl/build//boost_guigl/<link>static
+ <library>$(TOP)/libs/guigl/build//boost_guigl
     ;
 
-exe window_example : window_example.cpp two_spheres.cpp two_buttons.cpp ;
\ No newline at end of file
+exe window_example : window_example.cpp two_spheres.cpp two_buttons.cpp ;
+
+install window_example_stage : window_example
+ : <install-dependencies>on <install-type>EXE
+ <install-type>LIB <location>$(TOP)/bin.v2/stage/window_example
+ ;
+
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk