This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Exporting const functions from DLL
- From: Maarten Boekhold <boekhold at emirates dot net dot ae>
- To: cygwin at cygwin dot com
- Date: Fri, 24 Sep 2004 17:20:51 +0400
- Subject: Exporting const functions from DLL
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/