delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/24/09:21:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 24 Sep 2004 17:20:51 +0400
From: Maarten Boekhold <boekhold AT emirates DOT net DOT ae>
Subject: Exporting const functions from DLL
To: cygwin AT cygwin DOT com
Message-id: <41541F33.90905@emirates.net.ae>
MIME-version: 1.0
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-IsSubscribed: yes

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019