From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32529 invoked by alias); 17 Apr 2002 10:48:45 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 32519 invoked from network); 17 Apr 2002 10:48:41 -0000 Received: from unknown (HELO anchor-post-30.mail.demon.net) (194.217.242.88) by sources.redhat.com with SMTP; 17 Apr 2002 10:48:41 -0000 Received: from mailgate.softwire.co.uk ([62.49.203.138] helo=polarbear) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 16xmzQ-0005fr-0U; Wed, 17 Apr 2002 11:48:40 +0100 From: "Rupert Wood" To: "'Fredriksson, Johan'" Cc: Subject: RE: building dll on Solaris with the use of gnu-cross-compiler! Date: Wed, 17 Apr 2002 07:49:00 -0000 Message-ID: <616BE6A276E3714788D2AC35C40CD18D561656@whale.softwire.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: <616BE6A276E3714788D2AC35C40CD18D5B27B0@whale.softwire.co.uk> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-04/txt/msg00180.txt.bz2 Johan Fredriksson wrote: > I'm trying to build a dll on the solaris platform with use of > gcc-cross-compiler and cygwin. The problem is that if I use WINAPI > when I create my dll-entry-point, as I should according to cygwin, > the compiler or linker is not able to interpret windows.h. Can you elaborate on this a little? What do you mean not able to interpret? What error or warning to do you see? WINAPI specifies the calling convention of the procedure; DLL-exported functions should use the 'Pascal' convention that the callee cleans up arguments passed, as opposed to the usual C convention that the caller is responsible instead. The Microsoft keyword for this is (and what WINAPI is #defined to in the Microsoft headers) is '__stdcall', which cygwin/mingw GCC does support via the specs file and GCC's __attribute__ mechanism. Rup.