This is the mail archive of the cygwin@cygwin.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]
Other format: [Raw text]

Re: DirectX8/DirectInput + cygwin


Getting DirectX to work from cygwin GCC essentially can't be done from C++,
but can be done from C.  It can't be done from C++ because of the way COM
virtual tables work.  GCC can't clone Visual C++'s method because Microsoft
holds a U.S. patent on their exact method.  Just try using MFC from GCC and
you'll know exactly what I mean.

In C, the virtual table system is done by actually creating the vtable
structure in the header file, so this isn't a problem.  If you modify the
DirectX header files, you could fix this for C++, but you'd have to
do ->lpVtable all the time, like in C.

GCC, or rather binutils, can't handle the Microsoft import library format.
binutils of course has its own, so you could make your own from the DLL.

If import libraries don't work, you could always GetProcAddress on
DirectInputCreate8 after loading dinput8.dll.  Then the problem becomes how
to get to the weird global functions (D3DX matrix stuff, for instance).

-- Barubary

----- Original Message -----
From: "Dylan Cuthbert" <dylan@q-games.com>
To: "Cygwin@Cygwin. Com" <cygwin@cygwin.com>
Sent: Wednesday, February 06, 2002 2:22 AM
Subject: DirectX8/DirectInput + cygwin

> When compiling a DirectInput8 function such as DirectInput8Create() I get
an
> error linking:
> Unable to resolve DirectInput8Create@20



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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