Exporting const functions from DLL

Maarten Boekhold boekhold@emirates.net.ae
Fri Sep 24 13:38:00 GMT 2004


Hi,

I ran into the following:

icons.h:
const gchar *
resolve_folder_icon(tree_entry_t * en);

icons.c:
__declspec(dllexport)
const gchar *resolve_folder_icon (tree_entry_t * en)
{
etc..
}

Compile error:
icons.c:562: error: external linkage required for symbol 'resolve_icon' 
because of 'dllexport' attribute.
make: *** [libxffm_basic_la-icons.lo] Error 1

I found a reference to a similar problem at:
	http://www.cygwin.com/ml/cygwin/2003-11/msg00654.html

I tried removing the const, adding extern to the include file and all 
possible combinations of that, but no luck...

$ gcc --version
gcc (GCC) 3.3.3 (cygwin special)
$ uname -a
CYGWIN_NT-5.1 DXBM2003 1.5.11(0.116/4/2) 2004-09-04 23:17 i686 unknown 
unknown Cygwin

Does anybody know how to solve this?

Maarten


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list