This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building DLLs


Sounds like you need to update to the latest *binutils* package.

--Chuck


nacho wrote:

> 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!
> 
> 



--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]