cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3a3b12d40348eec715327abfe78b34c7fbaeb6cc

commit 3a3b12d40348eec715327abfe78b34c7fbaeb6cc
Author: Jean Guyomarc'h <jean.guyoma...@gmail.com>
Date:   Sun May 10 22:58:11 2015 +0200

    ecore_cocoa,ethumb: fix compiling after EAPI policy changes
    
    Summary:
    I went through a lot of undefined symbols while compiling ecore_evas_cocoa
    module and ethumb-related binaries. E.g.:
    
      Undefined symbols for architecture x86_64:
        "_ECORE_COCOA_EVENT_EXPOSE", referenced from:
            _ecore_evas_cocoa_new_internal in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
        "_ECORE_COCOA_EVENT_GOT_FOCUS", referenced from:
            _ecore_evas_cocoa_new_internal in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
        "_ECORE_COCOA_EVENT_LOST_FOCUS", referenced from:
            _ecore_evas_cocoa_new_internal in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
        "_ECORE_COCOA_EVENT_RESIZE", referenced from:
            _ecore_evas_cocoa_new_internal in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
        "_ECORE_COCOA_EVENT_WINDOW_DESTROY", referenced from:
            _ecore_evas_cocoa_new_internal in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
        "_ecore_cocoa_init", referenced from:
            _ecore_evas_cocoa_new_internal in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
        "_ecore_cocoa_screen_size_get", referenced from:
            __ecore_evas_screen_geometry_get in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
        "_ecore_cocoa_shutdown", referenced from:
            _ecore_evas_cocoa_new_internal in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
            __ecore_evas_cocoa_free in 
modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
    
      Undefined symbols for architecture x86_64:
        "_ethumb_calculate_aspect_from_ratio", referenced from:
            __resize_movie in modules_ethumb_emotion_module_la-emotion.o
        "_ethumb_calculate_fill_from_ratio", referenced from:
            __resize_movie in modules_ethumb_emotion_module_la-emotion.o
        "_ethumb_ecore_evas_get", referenced from:
            __frame_decode_cb in modules_ethumb_emotion_module_la-emotion.o
        "_ethumb_evas_get", referenced from:
            __thumb_generate in modules_ethumb_emotion_module_la-emotion.o
            __finish_thumb_generation in 
modules_ethumb_emotion_module_la-emotion.o
        "_ethumb_finished_callback_call", referenced from:
            __thumb_generate in modules_ethumb_emotion_module_la-emotion.o
            __frame_decode_cb in modules_ethumb_emotion_module_la-emotion.o
            __finish_thumb_generation in 
modules_ethumb_emotion_module_la-emotion.o
        "_ethumb_image_save", referenced from:
            __frame_decode_cb in modules_ethumb_emotion_module_la-emotion.o
        "_ethumb_plugin_image_resize", referenced from:
            __resize_movie in modules_ethumb_emotion_module_la-emotion.o
        "_ethumb_plugin_register", referenced from:
            __module_init in modules_ethumb_emotion_module_la-emotion.o
        "_ethumb_plugin_unregister", referenced from:
            __module_shutdown in modules_ethumb_emotion_module_la-emotion.o
    
    EAPI was not well re-defined in both cases. It has been handled in
    ecore_cocoa_private.h and ethumb_private.h. These files must be included
    after a main library header (because EAPI is undef there).
    
    Reviewers: cedric
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2483
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/ecore_cocoa/ecore_cocoa.m         |  3 +--
 src/lib/ecore_cocoa/ecore_cocoa_app.m     |  2 ++
 src/lib/ecore_cocoa/ecore_cocoa_private.h | 26 +++++++++++++++++++++++++-
 src/lib/ecore_cocoa/ecore_cocoa_window.m  |  5 +++--
 src/lib/ethumb/ethumb_private.h           | 26 ++++++++++++++++++++++++++
 5 files changed, 57 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m 
b/src/lib/ecore_cocoa/ecore_cocoa.m
index 64eda41..bdc5cf0 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa.m
@@ -9,12 +9,11 @@
 #include <Eina.h>
 
 #include <Ecore.h>
-#include <ecore_cocoa_private.h>
 #include <Ecore_Input.h>
 
 #include "Ecore_Cocoa.h"
 #include "Ecore_Cocoa_Keys.h"
-
+#include "ecore_cocoa_private.h"
 
 EAPI int ECORE_COCOA_EVENT_GOT_FOCUS = 0;
 EAPI int ECORE_COCOA_EVENT_LOST_FOCUS = 0;
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_app.m 
b/src/lib/ecore_cocoa/ecore_cocoa_app.m
index 5ee349c..d05070a 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_app.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_app.m
@@ -1,4 +1,6 @@
 #import "ecore_cocoa_app.h"
+#import "ecore_cocoa_window.h"
+#include "ecore_cocoa_private.h"
 
 static Eina_Bool
 _ecore_cocoa_run_loop_cb(void *data EINA_UNUSED)
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_private.h 
b/src/lib/ecore_cocoa/ecore_cocoa_private.h
index 9127de1..ffe48ab 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_private.h
+++ b/src/lib/ecore_cocoa/ecore_cocoa_private.h
@@ -1,7 +1,31 @@
 #ifndef _ECORE_COCOA_PRIVATE_H
 #define _ECORE_COCOA_PRIVATE_H
 
-#include "ecore_cocoa_window.h"
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+# ifdef EFL_ECORE_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
+# else
+#  define EAPI __declspec(dllimport)
+# endif /* ! EFL_ECORE_BUILD */
+#else
+# ifdef __GNUC__
+#  if __GNUC__ >= 4
+#   define EAPI __attribute__ ((visibility("default")))
+#  else
+#   define EAPI
+#  endif
+# else
+#  define EAPI
+# endif
+#endif /* ! _WIN32 */
 
 extern int _ecore_cocoa_log_domain;
 
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m 
b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index eabc65f..2fd4bab 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -2,11 +2,12 @@
 # include <config.h>
 #endif
 
+#include <Ecore_Input.h>
+
 #include <Ecore.h>
 #include <Ecore_Cocoa.h>
-#include "ecore_cocoa_private.h"
 #import "ecore_cocoa_window.h"
-#include <Ecore_Input.h>
+#include "ecore_cocoa_private.h"
 
 @implementation EcoreCocoaWindow
 
diff --git a/src/lib/ethumb/ethumb_private.h b/src/lib/ethumb/ethumb_private.h
index 49e4de9..32e42ac 100644
--- a/src/lib/ethumb/ethumb_private.h
+++ b/src/lib/ethumb/ethumb_private.h
@@ -4,6 +4,32 @@
 #include <Ethumb.h>
 #include <Ethumb_Plugin.h>
 
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef _WIN32
+# ifdef EFL_ETHUMB_BUILD
+#  ifdef DLL_EXPORT
+#   define EAPI __declspec(dllexport)
+#  else
+#   define EAPI
+#  endif /* ! DLL_EXPORT */
+# else
+#  define EAPI __declspec(dllimport)
+# endif /* ! EFL_ETHUMB_BUILD */
+#else
+# ifdef __GNUC__
+#  if __GNUC__ >= 4
+#   define EAPI __attribute__ ((visibility("default")))
+#  else
+#   define EAPI
+#  endif
+# else
+#  define EAPI
+# endif
+#endif /* ! _WIN32 */
+
 typedef struct _Ethumb_Frame Ethumb_Frame;
 
 struct _Ethumb_Frame

-- 


Reply via email to