Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <269620-220035321161122570@M2W072.mail2web.com> X-Priority: 3 Reply-To: lhall AT rfk DOT com X-Originating-IP: 209.113.174.244 From: "lhall AT pop DOT ma DOT ultranet DOT com" To: aca00gac AT shef DOT ac DOT uk, cygwin AT cygwin DOT com Subject: Re: DirectX and Cygwin Date: Wed, 21 May 2003 12:11:22 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 X-OriginalArrivalTime: 21 May 2003 16:15:00.0104 (UTC) FILETIME=[20C7B880:01C31FB4] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h4LGDi904541 OK, let me rephrase my answer in response to your reiteration of the problem. If the prototypes for the functions you're using aren't declared with the same calling convention as the library you're using and the --enable-stdcall-fixup flag for 'ld' isn't solving the problem automagically for you, then you could try declaring the prototypes you need with the proper calling convention for the library you're using. This is just one option, of course. Others would be to examine the prototype declarations in the header files provided and determine why they would be declaring the functions as stdcall vs the library's requirement that they use the cdecl convention. Another is to create your own mapping using a .def file. Probably the most involved, but certainly the most educational, is to look at the 'ld' source and determine why the --enable-stdcall-fixup flag isn't doing what you expect. Any of these options is likely to provide you with insight to the problem you're having now, even if they don't provide the actual solution (for some unknown reason). Good luck, Larry Original Message: ----------------- From: Graham Cox aca00gac AT shef DOT ac DOT uk Date: Wed, 21 May 2003 13:08:31 +0100 To: cygwin AT cygwin DOT com Subject: Re: DirectX and Cygwin On Wednesday, May 21, 2003 2:07 AM [GMT+0100=CET], Larry Hall (RFK Partners, Inc.) wrote: > So if --enable-stdcall-fixup isn't getting you what you want/need, why > not do it the "old-fashioned" way and simply declare the prototypes > for the needed functions with the correct calling convention? It's a > little more work but you're sure to get what you need. All the function prototypes are in the header files that come with the SDK. Compiling my code with these isn't a problem at all. The problem comes in when the linker tries to link my object files against the supplies library files, because the names seem to be different to what was expected. The library files have names like Direct3DCreate9, and the linker is looking for Direct3DCreate9 AT 4. As far as I can make out, ld should be able to tell that these two are the same thing and link one against the other, but it's not managing to. Therein lies the problem... -- Graham Cox 3rd year BSc/AI Student University of Sheffield -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/