This is the mail archive of the cygwin@sourceware.cygnus.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]

Re: i hate declspec


Hello Kevin,

Kevin Meinert <kevn@vrjuggler.org> wrote:

KM> I have a question about generating dlls using cross-platform code and
KM> cross-platform build system, without ever needing to specify "declspec" in
KM> the source.  I noticed that a lot of people have asked about this and there
KM> are many answers, but all seems to point to using gcc,ld,and dlltool.  I
KM> think I need to use the microsoft compiler to avoid name mangling problems
KM> (correct me if im wrong).  Also, let me know if you know of a different mail
KM> list I should direct this to since it deals with the M$ compilers.


KM> So, basic question:
KM> -------------------
KM> Is there some tool or option to "export all" symbols from .objs's to create
KM> a .dll that will work without the obtrusive __declspec littered through the
KM> code?  Of course i'd want to compile an exe against this .dll, and the
KM> .dll's headers cannot have any declspec or other M$ weirdness.
KM> I need to use cl.exe and link.exe
KM> Will dlltool or implib work for me?  Could you send me an example, I've been
KM> trying with dlltool, and have had no luck.

    First, have you tried to search archives? Recommended. It's only
about week when I dumped my achievements in making dlls sane.

    Resuming: __declspec(dllexport) is strictly optional;
__declspec(dllimport) is in some way "mandatory", however, I worked
out technique how to subdue even it. http://www.is.lg.ua/~paul/devel/
may contain background information and examples you want.

[]

KM> The GNU tools will do exactly what I need (export all symbols), but C++ name
KM> mangling is different between GNU and M$VC compilers.  so... I believe I
KM> need to use the MSVC compilers.

    Your logic is strange. If I'd dislike "M$ weirdness" as you do,
I'd use only GNU tools, what exactly I do. So, consider giving up
msvc.


KM> Thanks for any help,
KM> Kevin
KM> ~~ Please CC: kevn@vrac.iastate.edu, im not on the mail list.



--
Paul Sokolovsky, IT Specialist
http://www.brainbench.com/transcript.jsp?pid=11135



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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