delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/11/14/01:58:47

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Wed, 14 Nov 2001 04:06:25 -0300
From: nacho <nacho AT iie DOT edu DOT uy>
X-Mailer: The Bat! (v1.49) UNREG / CD5BF9353B3B7091
Reply-To: nacho <nacho AT iie DOT edu DOT uy>
Organization: IIE
X-Priority: 3 (Normal)
Message-ID: <138497216.20011114040625@iie.edu.uy>
To: cygwin AT cygwin DOT com
Subject: building DLLs
Mime-Version: 1.0

Hi all,

I'm new to this list and I will start with a question that I think
has been asked many times in the past (I've read the archives)
but still can't find a solution.

I'm trying to build a popular XML parsing library, Xerces, on Cygwin
and it requires creating a DLL.

I'm not going into details but there's something specific that
shouldn't happen:

It's supposed that __declspec(dllexport) and __declspec(dllexport) are
no longer needed right? Well, if I omit those then any DLL I try to
build (a very simple example) fails at link time telling me it
cannot export __bss_start, __bss_end, __data_start and __data_end
because they are not defined.

Moreover, I downloaded the latest "dllhelpers" distribution, which
says it works for gcc 2.95.3, the same I have.
I tried all of the examples from it and NONE of them compiles,
all yielding the same errors. Now this is really alarming since
the last update to the dllhelpers was only a month ago.

Well, then I tried, again in my little test DLL, to use the
__declspec directives.

This works, and I knew it worked before because that was the way
I was working before, but only if I put the __declspec in the
definition of the functions (in the .c or .cpp).

When compiling C++ classes, again I can make things work if
I use the __declspec(dllexport) on each method declaration,
and not in the .cpp, but if I put the __declspec(dllexport) on
the class declaration header then again any method in the .cpp
without the __declspec repeated will not appear when linking
an example program against the import library.

Does anyone know what's happening?? This behaavior is not
the expected at all right?

I'd really appreciate the help. I need this package compiled!

-- 
Saludos,
 nacho                          mailto:nacho AT iie DOT edu DOT uy
--
"Yo no soy paranoico. Eso es lo que *ellos* quieren que piense"
--



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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