Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Date: Mon, 15 May 2000 13:05:39 +0300 From: Paul Sokolovsky X-Mailer: The Bat! (v1.32) S/N AB51B607 Reply-To: Paul Sokolovsky X-Priority: 3 (Normal) Message-ID: <18545.000515@is.lg.ua> To: Kevin Meinert CC: cygwin AT sourceware DOT cygnus DOT com Subject: Re: i hate declspec In-reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello Kevin, Kevin Meinert 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 AT vrac DOT iastate DOT 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 AT sourceware DOT cygnus DOT com