Page MenuHomePhabricator

eina: Rename EAPI macro to EINA_API in Eina library
ClosedPublic

Authored by felipealmeida on Thu, Nov 12, 12:47 PM.

Details

Summary

Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

EAPI was designed to be able to pass
__attribute__ ((visibility ("default"))) for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC almost works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:

EAPI void foo(void);

EAPI void bar()
{
  foo();
}

dll2:

EAPI void foo()
{
  printf ("foo\n");
}

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
__atttribute__((visibility("default")))

However, the following:
Example 2:

dll1:

EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}

dll2:

EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}

This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
felipealmeida created this revision.Thu, Nov 12, 12:47 PM
felipealmeida requested review of this revision.Thu, Nov 12, 12:47 PM
jptiz added inline comments.Thu, Nov 12, 12:53 PM
src/tests/eina/eina_test_abi.c
46–48

Where did this go? Or was it 100% unused/already declared?

felipealmeida added inline comments.Thu, Nov 12, 12:55 PM
src/tests/eina/eina_test_abi.c
46–48

Good catch. I have to look.

felipealmeida added inline comments.Thu, Nov 12, 12:59 PM
src/tests/eina/eina_test_abi.c
46–48

Just checked. This is a source file. It doesn't make sense to have this declaration here. It already exists in the header file. The patch caught it because we changed the declaration in one, but rather than change in both, we just removed the second, useless, one.

jptiz accepted this revision.Thu, Nov 12, 1:15 PM
jptiz added inline comments.
src/tests/eina/eina_test_abi.c
46–48

Right, makes sense. Can be marked as done.

This revision is now accepted and ready to land.Thu, Nov 12, 1:15 PM
felipealmeida marked 4 inline comments as done.Thu, Nov 12, 1:18 PM
lucas accepted this revision.Tue, Nov 17, 5:38 AM
Found ninja.EXE-1.10.1 at E:\Documents\programmes_x64\msys2\mingw64\bin/ninja.EXE
[1/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_locale.c.obj
[2/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_langinfo.c.obj
[3/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_string.c.obj
[4/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_stdlib.c.obj
[5/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_mman.c.obj
[6/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_dlfcn.c.obj
[7/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_time.c.obj
[8/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_main.c.obj
[9/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_stdio.c.obj
[10/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_unistd.c.obj
[11/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_util.c.obj
[12/2419] Compiling C object src/lib/evil/41a5db3@@evil@sha/evil_fcntl.c.obj
[13/2419] Linking target src/lib/evil/libevil-1.dll
[14/2419] Generating symbol file src/lib/evil/41a5db3@@evil@sha/libevil-1.dll.symbols
[15/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_abi.c.obj
[16/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_binshare.c.obj
[17/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_counter.c.obj
[18/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_array.c.obj
[19/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_convert.c.obj
[20/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_binbuf.c.obj
[21/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_crc.c.obj
[22/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_cow.c.obj
[23/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_cpu.c.obj
[24/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_debug_bt.c.obj
../src/lib/eina/eina_debug_bt.c: In function '_collect_bt':
../src/lib/eina/eina_debug_bt.c:296:23: warning: unused parameter 'pth' [-Wunused-parameter]
  296 | _collect_bt(pthread_t pth)
      |             ~~~~~~~~~~^~~
[25/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_benchmark.c.obj
[26/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_accessor.c.obj
[27/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_debug_thread.c.obj
[28/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_debug_cpu.c.obj
[29/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_debug_timer.c.obj
[30/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_fp.c.obj
[31/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_hamster.c.obj
[32/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_debug_bt_file.c.obj
[33/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_debug_chunk.c.obj
[34/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_evlog.c.obj
[35/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_debug.c.obj
../src/lib/eina/eina_debug.c: In function 'eina_debug_session_send':
../src/lib/eina/eina_debug.c:148:29: warning: variable 'hdr' set but not used [-Wunused-but-set-variable]
  148 |    Eina_Debug_Packet_Header hdr;
      |                             ^~~
[36/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_error.c.obj
[37/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_file_common.c.obj
[38/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_lock.c.obj
[39/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_inarray.c.obj
[40/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_iterator.c.obj
[41/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_inlist.c.obj
[42/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_lalloc.c.obj
[43/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_list.c.obj
[44/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_hash.c.obj
[45/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_magic.c.obj
[46/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_main.c.obj
[47/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_module.c.obj
[48/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_mempool.c.obj
[49/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_log.c.obj
[50/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_mmap.c.obj
[51/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_matrix.c.obj
[52/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_prefix.c.obj
[53/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_sched.c.obj
[54/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_matrixsparse.c.obj
[55/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_quad.c.obj
[56/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_quadtree.c.obj
[57/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_share_common.c.obj
[58/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_safety_checks.c.obj
[59/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_rectangle.c.obj
[60/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_thread.c.obj
[61/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_rbtree.c.obj
[62/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_str.c.obj
[63/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_strbuf.c.obj
[64/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_simple_xml_parser.c.obj
[65/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_promise.c.obj
[66/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_strbuf_common.c.obj
[67/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_tmpstr.c.obj
[68/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_ustringshare.c.obj
[69/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_unicode.c.obj
[70/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_value_util.c.obj
[71/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_stringshare.c.obj
[72/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_thread_queue.c.obj
[73/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_ustrbuf.c.obj
[74/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_tiler.c.obj
[75/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_util.c.obj
[76/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_safepointer.c.obj
[77/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_abstract_content.c.obj
[78/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_vpath.c.obj
[79/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_xattr.c.obj
[80/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_vpath_xdg.c.obj
[81/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_quaternion.c.obj
[82/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_freeq.c.obj
[83/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_bezier.c.obj
[84/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_slstr.c.obj
[85/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/.._.._modules_eina_mp_one_big_eina_one_big.c.obj
[86/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/eolian.c.obj
[87/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/eo_lexer.c.obj
[88/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_class.c.obj
[89/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/.._.._modules_eina_mp_pass_through_eina_pass_through.c.obj
[90/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_class_api.c.obj
[91/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/eolian_database.c.obj
[92/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_function.c.obj
[93/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_file_win32.c.obj
../src/lib/eina/eina_file_win32.c: In function 'eina_file_map_faulted':
../src/lib/eina/eina_file_win32.c:1127:2: warning: #warning "We need to handle access to corrupted memory mapped file." [-Wcpp]
 1127 | #warning "We need to handle access to corrupted memory mapped file."
      |  ^~~~~~~
[94/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_function_parameter.c.obj
[95/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_check.c.obj
[96/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_function_api.c.obj
[97/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/eina_value.c.obj
[98/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_function_parameter_api.c.obj
[99/2419] Compiling C object src/lib/eina/803ee99@@eina@sha/.._.._modules_eina_mp_chained_pool_eina_chained_mempool.c.obj
[100/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_implement.c.obj
[101/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_constructor.c.obj
[102/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_implement_api.c.obj
[103/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_type.c.obj
[104/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_type_api.c.obj
[105/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_constructor_api.c.obj
[106/2419] Linking target src/lib/eina/libeina-1.dll
[107/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_event.c.obj
[108/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_event_api.c.obj
[109/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_part.c.obj
[110/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_part_api.c.obj
[111/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/eo_parser.c.obj
[112/2419] Generating symbol file src/lib/eina/803ee99@@eina@sha/libeina-1.dll.symbols
[113/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_var.c.obj
[114/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_var_api.c.obj
[115/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_expr_api.c.obj
[116/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/eolian_aux.c.obj
[117/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_expr.c.obj
[118/2419] Compiling C object src/bin/eolian/70b716a@@eolian_gen@exe/headers.c.obj
[119/2419] Compiling C object src/bin/eolian/70b716a@@eolian_gen@exe/types.c.obj
[120/2419] Compiling C object src/bin/eolian/70b716a@@eolian_gen@exe/main.c.obj
[121/2419] Compiling C object src/static_libs/freetype/5553d54@@freetype@sta/sw_ft_math.c.obj
[122/2419] Compiling C object src/static_libs/libunibreak/7585b50@@libunibreak@sta/unibreakbase.c.obj
[123/2419] Compiling C object src/static_libs/libunibreak/7585b50@@libunibreak@sta/unibreakdef.c.obj
[124/2419] Compiling C object src/static_libs/freetype/5553d54@@freetype@sta/sw_ft_raster.c.obj
[125/2419] Compiling C object src/static_libs/libunibreak/7585b50@@libunibreak@sta/linebreakdata.c.obj
[126/2419] Compiling C object src/static_libs/libunibreak/7585b50@@libunibreak@sta/linebreak.c.obj
[127/2419] Compiling C object src/bin/eolian/70b716a@@eolian_gen@exe/docs.c.obj
[128/2419] Compiling C object src/static_libs/libunibreak/7585b50@@libunibreak@sta/linebreakdef.c.obj
[129/2419] Compiling C object src/lib/eolian/15a7593@@eolian@sha/database_validate.c.obj
[130/2419] Compiling C object src/bin/eolian/70b716a@@eolian_gen@exe/sources.c.obj
[131/2419] Compiling C object src/static_libs/libunibreak/7585b50@@libunibreak@sta/emojidef.c.obj
[132/2419] Compiling C object src/static_libs/libunibreak/7585b50@@libunibreak@sta/graphemebreak.c.obj
[133/2419] Compiling C object src/static_libs/http-parser/4a9ca9e@@http-parser@sta/http_parser.c.obj
[134/2419] Compiling C object src/static_libs/libunibreak/7585b50@@libunibreak@sta/wordbreak.c.obj
[135/2419] Linking static target src/static_libs/http-parser/libhttp-parser.a
[136/2419] Compiling C object src/tests/a4ccf2d@@timeout@exe/timeout.c.obj
[137/2419] Linking target src/lib/eolian/libeolian-1.dll
[138/2419] Linking static target src/static_libs/libunibreak/liblibunibreak.a
[139/2419] Compiling C object src/static_libs/freetype/5553d54@@freetype@sta/sw_ft_stroker.c.obj
[140/2419] Linking static target src/static_libs/freetype/libfreetype.a
[141/2419] Linking target src/tests/timeout.exe
[142/2419] Compiling C object src/generic/evas/580f2bf@@evas_image_loader.gst@exe/gst_main.c.obj
[143/2419] Generating symbol file src/lib/eolian/15a7593@@eolian@sha/libeolian-1.dll.symbols
[144/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_fp.c.obj
[145/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_ustringshare.c.obj
[146/2419] Compiling C object src/generic/evas/580f2bf@@evas_image_loader.xcf@exe/xcf_pixelfuncs.c.obj
[147/2419] Linking target src/bin/eolian/eolian_gen.exe
[148/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_suite.c.obj
[149/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_debug.c.obj
../src/tests/eina/eina_test_debug.c: In function 'eina_test_debug':
../src/tests/eina/eina_test_debug.c:21:24: warning: unused parameter 'tc' [-Wunused-parameter]
   21 | eina_test_debug(TCase *tc)
      |                 ~~~~~~~^~
[150/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_binshare.c.obj
[151/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_binbuf.c.obj
[152/2419] Generating eolian_gen_efl_object_override.eo with a meson_exe.py custom command
[153/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_array.c.obj
[154/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_clist.c.obj
[155/2419] Generating eolian_gen_eina_types.eot with a meson_exe.py custom command
[156/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_inarray.c.obj
[157/2419] Generating eolian_gen_efl_object.eo with a meson_exe.py custom command
[158/2419] Generating eolian_gen_efl_gfx_fill.eo with a meson_exe.py custom command
[159/2419] Generating eolian_gen_efl_gfx_entity.eo with a meson_exe.py custom command
[160/2419] Generating eolian_gen_efl_class.eo with a meson_exe.py custom command
[161/2419] Generating eolian_gen_efl_gfx_color.eo with a meson_exe.py custom command
[162/2419] Generating eolian_gen_efl_ui_draggable.eo with a meson_exe.py custom command
[163/2419] Generating eolian_gen_efl_gfx_image.eo with a meson_exe.py custom command
[164/2419] Generating eolian_gen_efl_ui_scrollbar.eo with a meson_exe.py custom command
[165/2419] Generating eolian_gen_efl_ui_scrollable.eo with a meson_exe.py custom command
[166/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_ustr.c.obj
[167/2419] Generating eolian_gen_efl_gfx_frame_controller.eo with a meson_exe.py custom command
[168/2419] Generating eolian_gen_efl_ui_container_selectable.eo with a meson_exe.py custom command
[169/2419] Compiling C object src/tests/eina/b4d9399@@eina_suite@exe/eina_test_abi.c.obj
[170/2419] Compiling C object src/lib/eo/69b6b62@@eo@sha/eo_class_class.c.obj
In file included from ../src/lib/eo/eo_class_class.c:5:
src/lib/eo/efl_class.eo.c:27:18: warning: 'efl_class_class_get' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   27 | EFL_DEFINE_CLASS(efl_class_class_get, &_efl_class_class_desc, NULL, NULL);
      |                  ^~~~~~~~~~~~~~~~~~~
../src/lib/eo/Eo.h:801:1: note: in definition of macro 'EFL_DEFINE_CLASS'
  801 | class_get_func_name(void) \
      | ^~~~~~~~~~~~~~~~~~~
[171/2419] Compiling C object src/lib/eo/69b6b62@@eo_dbg@sha/eo_class_class.c.obj
In file included from ../src/lib/eo/eo_class_class.c:5:
src/lib/eo/efl_class.eo.c:27:18: warning: 'efl_class_class_get' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   27 | EFL_DEFINE_CLASS(efl_class_class_get, &_efl_class_class_desc, NULL, NULL);
      |                  ^~~~~~~~~~~~~~~~~~~
../src/lib/eo/Eo.h:801:1: note: in definition of macro 'EFL_DEFINE_CLASS'
  801 | class_get_func_name(void) \
      | ^~~~~~~~~~~~~~~~~~~
[172/2419] Compiling C object src/lib/eo/69b6b62@@eo@sha/eo_ptr_indirection.c.obj
[173/2419] Generating eolian_gen_efl_ui_zoom.eo with a meson_exe.py custom command
[174/2419] Generating eolian_gen_efl_playable.eo with a meson_exe.py custom command
[175/2419] Compiling C object src/lib/eo/69b6b62@@eo@sha/eo_add_fallback.c.obj
[176/2419] Compiling C object src/lib/eo/69b6b62@@eo@sha/eo_base_class.c.obj
FAILED: src/lib/eo/69b6b62@@eo@sha/eo_base_class.c.obj
cc @src/lib/eo/69b6b62@@eo@sha/eo_base_class.c.obj.rsp
In file included from ../src/lib/eo/eo_base_class.c:2852:
src/lib/eo/efl_object.eo.c:1:35: error: variable '_EFL_EVENT_DEL' definition is marked dllimport
    1 | EWAPI const Efl_Event_Description _EFL_EVENT_DEL =
      |                                   ^~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:1:35: warning: '_EFL_EVENT_DEL' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:3:35: error: variable '_EFL_EVENT_INVALIDATE' definition is marked dllimport
    3 | EWAPI const Efl_Event_Description _EFL_EVENT_INVALIDATE =
      |                                   ^~~~~~~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:3:35: warning: '_EFL_EVENT_INVALIDATE' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:5:35: error: variable '_EFL_EVENT_NOREF' definition is marked dllimport
    5 | EWAPI const Efl_Event_Description _EFL_EVENT_NOREF =
      |                                   ^~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:5:35: warning: '_EFL_EVENT_NOREF' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:7:35: error: variable '_EFL_EVENT_OWNERSHIP_UNIQUE' definition is marked dllimport
    7 | EWAPI const Efl_Event_Description _EFL_EVENT_OWNERSHIP_UNIQUE =
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:7:35: warning: '_EFL_EVENT_OWNERSHIP_UNIQUE' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:9:35: error: variable '_EFL_EVENT_OWNERSHIP_SHARED' definition is marked dllimport
    9 | EWAPI const Efl_Event_Description _EFL_EVENT_OWNERSHIP_SHARED =
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:9:35: warning: '_EFL_EVENT_OWNERSHIP_SHARED' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:11:35: error: variable '_EFL_EVENT_DESTRUCT' definition is marked dllimport
   11 | EWAPI const Efl_Event_Description _EFL_EVENT_DESTRUCT =
      |                                   ^~~~~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:11:35: warning: '_EFL_EVENT_DESTRUCT' redeclared without dllimport attribute after being referenced with dll linkage
In file included from ../src/lib/eo/eo_base_class.c:8:
src/lib/eo/efl_object.eo.c:338:18: warning: 'efl_object_class_get' redeclared without dllimport attribute after being referenced with dll linkage
  338 | EFL_DEFINE_CLASS(efl_object_class_get, &_efl_object_class_desc, NULL, NULL);
      |                  ^~~~~~~~~~~~~~~~~~~~
../src/lib/eo/Eo.h:801:1: note: in definition of macro 'EFL_DEFINE_CLASS'
  801 | class_get_func_name(void) \
      | ^~~~~~~~~~~~~~~~~~~
[177/2419] Compiling C object src/lib/eo/69b6b62@@eo_dbg@sha/eo_ptr_indirection.c.obj
[178/2419] Generating eolian_gen_efl_config.eo with a meson_exe.py custom command
[179/2419] Generating eolian_gen_efl_duplicate.eo with a meson_exe.py custom command
[180/2419] Generating eolian_gen_efl_control.eo with a meson_exe.py custom command
[181/2419] Compiling C object src/lib/eo/69b6b62@@eo_dbg@sha/eo_add_fallback.c.obj
[182/2419] Generating eolian_gen_efl_file.eo with a meson_exe.py custom command
[183/2419] Compiling C object src/lib/eo/69b6b62@@eo_dbg@sha/eo_base_class.c.obj
FAILED: src/lib/eo/69b6b62@@eo_dbg@sha/eo_base_class.c.obj
cc @src/lib/eo/69b6b62@@eo_dbg@sha/eo_base_class.c.obj.rsp
In file included from ../src/lib/eo/eo_base_class.c:2852:
src/lib/eo/efl_object.eo.c:1:35: error: variable '_EFL_EVENT_DEL' definition is marked dllimport
    1 | EWAPI const Efl_Event_Description _EFL_EVENT_DEL =
      |                                   ^~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:1:35: warning: '_EFL_EVENT_DEL' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:3:35: error: variable '_EFL_EVENT_INVALIDATE' definition is marked dllimport
    3 | EWAPI const Efl_Event_Description _EFL_EVENT_INVALIDATE =
      |                                   ^~~~~~~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:3:35: warning: '_EFL_EVENT_INVALIDATE' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:5:35: error: variable '_EFL_EVENT_NOREF' definition is marked dllimport
    5 | EWAPI const Efl_Event_Description _EFL_EVENT_NOREF =
      |                                   ^~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:5:35: warning: '_EFL_EVENT_NOREF' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:7:35: error: variable '_EFL_EVENT_OWNERSHIP_UNIQUE' definition is marked dllimport
    7 | EWAPI const Efl_Event_Description _EFL_EVENT_OWNERSHIP_UNIQUE =
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:7:35: warning: '_EFL_EVENT_OWNERSHIP_UNIQUE' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:9:35: error: variable '_EFL_EVENT_OWNERSHIP_SHARED' definition is marked dllimport
    9 | EWAPI const Efl_Event_Description _EFL_EVENT_OWNERSHIP_SHARED =
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:9:35: warning: '_EFL_EVENT_OWNERSHIP_SHARED' redeclared without dllimport attribute after being referenced with dll linkage
src/lib/eo/efl_object.eo.c:11:35: error: variable '_EFL_EVENT_DESTRUCT' definition is marked dllimport
   11 | EWAPI const Efl_Event_Description _EFL_EVENT_DESTRUCT =
      |                                   ^~~~~~~~~~~~~~~~~~~
src/lib/eo/efl_object.eo.c:11:35: warning: '_EFL_EVENT_DESTRUCT' redeclared without dllimport attribute after being referenced with dll linkage
In file included from ../src/lib/eo/eo_base_class.c:8:
src/lib/eo/efl_object.eo.c:338:18: warning: 'efl_object_class_get' redeclared without dllimport attribute after being referenced with dll linkage
  338 | EFL_DEFINE_CLASS(efl_object_class_get, &_efl_object_class_desc, NULL, NULL);
      |                  ^~~~~~~~~~~~~~~~~~~~
../src/lib/eo/Eo.h:801:1: note: in definition of macro 'EFL_DEFINE_CLASS'
  801 | class_get_func_name(void) \
      | ^~~~~~~~~~~~~~~~~~~
[184/2419] Compiling C object src/lib/eo/69b6b62@@eo@sha/eo.c.obj
In file included from ../src/lib/eo/eo.c:19:
src/lib/eo/efl_object_override.eo.c:27:18: warning: 'efl_object_override_class_get' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   27 | EFL_DEFINE_CLASS(efl_object_override_class_get, &_efl_object_override_class_desc, NULL, NULL);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/lib/eo/Eo.h:801:1: note: in definition of macro 'EFL_DEFINE_CLASS'
  801 | class_get_func_name(void) \
      | ^~~~~~~~~~~~~~~~~~~
[185/2419] Compiling C object src/lib/eo/69b6b62@@eo_dbg@sha/eo.c.obj
In file included from ../src/lib/eo/eo.c:19:
src/lib/eo/efl_object_override.eo.c:27:18: warning: 'efl_object_override_class_get' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   27 | EFL_DEFINE_CLASS(efl_object_override_class_get, &_efl_object_override_class_desc, NULL, NULL);
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/lib/eo/Eo.h:801:1: note: in definition of macro 'EFL_DEFINE_CLASS'
  801 | class_get_func_name(void) \
      | ^~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

@vtorri Thanks! I'll try to cross-compile to mingw in my machine. I know it is because I changed EWAPI to use EINA_API, which makes it useless in other libraries. I've changed back EWAPI to use EAPI, but I need to try to compile to check it.

ProhtMeyhet edited the summary of this revision. (Show Details)Tue, Nov 24, 3:19 AM
This comment was removed by ProhtMeyhet.

I took the liberty to correct your markdown. Please look out for this in the future. Thank you.

I took the liberty to correct your markdown. Please look out for this in the future. Thank you.

Thanks. I had it corrected locally. Was waiting to be able to test with cross compilation from mingw to upload it. However, your formatting seems to be better than what I had.

Fixed macros that must continue to use EAPI for now

Fix inline code

Fix formatting of inline code in git message

felipealmeida edited the summary of this revision. (Show Details)Tue, Nov 24, 4:41 PM
felipealmeida edited the summary of this revision. (Show Details)
vtorri accepted this revision.Tue, Nov 24, 11:08 PM

good now

This revision was automatically updated to reflect the committed changes.