On Fri, 15 Feb 2008, Mike Frysinger wrote:

Another thing I've discovered is how libtool manages the export of the
functions on Windows. Everything is done with EAPI with a small
modification. But, contrary to gcc on linux, which does not complain when
EAPI is used on declaration and definition of the functions, on Windows
there is an error. So I have to define to nothing EAPI on Windows. I added
that in eet_lib.c, eet_data.c and eet_image.c.

can you elaborate ?  you're saying that this fails on windows:
EAPI void foo(void);
EAPI void foo(void) {....}
and so you need to undefine EAPI before the function definition ?

I was indeed not clear. Yes, using __declspec(dll[ex/im]port) in both declaration and definition fails during the compilation. So i have to not only undef EAPI, but I also have to define it to nothing.

Another solution would be to remove EAPI on definitions of the exported
functions (it's sufficient to have it on declarations). But raster prefers
to keep them as it shows which functions are really exported in the .c
files. I think that it can be replaced by organising the files like that:

as long as gcc sees the function prototype first with all attributes declared
there, all attributes can be removed from the function definition.  perhaps a
middle ground would be to use EAPI in the headers and then use a slightly
different define in the source "EAPI_DEF" ...

that could be a solution.

-libeet_la_LIBADD       = -lz -ljpeg @fnmatch_libs@ @winsock_libs@ -lm
+libeet_la_LIBADD       = @EVIL_LIBS@ -lz -ljpeg @fnmatch_libs@
@win32_libs@ -lm

i think EVIL_LIBS will have to come last rather than first

Actually, as it's only Windows flags, EVIL_LIBS is independent of the other flags, so it should not matter. On linux, it will not be used as EVIL_LIBS will be empty. On Windows, i didn't see any problem.

Vincent
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to