This is the mail archive of the 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: DirectX and Cygwin

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,


Original Message:
From: Graham Cox
Date: Wed, 21 May 2003 13:08:31 +0100
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@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:
Problem reports:

mail2web - Check your email from the web at .

Unsubscribe info:
Problem reports:

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