www.digitalmars.com         C & C++   DMDScript  

c++ - DirectX

reply "Ronny Krüger" <rk_DarkAngel freenet.de> writes:
Hello...

Is it possible, to write DirectX programms with DMC?

If yes, what do I need for it?

thx
Jul 19 2002
parent reply "Nic Tiger" <nictiger pt.comcor.ru> writes:
You can get .lib files from MS DIRECTX SDK (or from Borland C Builder 5) and
convert them to OMF format. Then you have to get .H files from the same SDK
(or, again, from Builder).

If you use limited set of DirectX functions, can build .lib yourself from
.DLL using implib.exe utility.

It's enough. I built DirectX 7 application using DMC pretty easy.
I think if you take DirectX 8 SDK, you can also build DirectX 8 application.

Nic Tiger.

"Ronny Krüger" <rk_DarkAngel freenet.de> wrote in message
news:ah9ran$31fb$1 digitaldaemon.com...
 Hello...

 Is it possible, to write DirectX programms with DMC?

 If yes, what do I need for it?

 thx

Jul 20 2002
parent reply "Ronny Krüger" <rk_DarkAngel freenet.de> writes:
Thank you, but there is another problem I encountered (I got the DirectX 8.1
SDK):

When I compile the example-code from

    samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice

DMC compiles the code, so that it want a function called

    _Direct3DCreate8 4

which is available in th MS .lib-file, but not in the converted one.

Is there any solution for this problem (or is this one of the functions
which don't work)?

Can you (or anyone else) give me a short sample, how to start with DirectX?

thanx

Ronny Krüger


Nic Tiger <nictiger pt.comcor.ru> schrieb in im Newsbeitrag:
ahcbf1$2ve7$1 digitaldaemon.com...
 You can get .lib files from MS DIRECTX SDK (or from Borland C Builder 5)

 convert them to OMF format. Then you have to get .H files from the same

 (or, again, from Builder).

 If you use limited set of DirectX functions, can build .lib yourself from
 .DLL using implib.exe utility.

 It's enough. I built DirectX 7 application using DMC pretty easy.
 I think if you take DirectX 8 SDK, you can also build DirectX 8

 Nic Tiger.

Jul 21 2002
next sibling parent Jan Knepper <jan smartsoft.cc> writes:
Create your own .LIB from the .DLL with IMPLIB and a .DEF file.
I think there is an example on the website somewhere.
Jan



"Ronny Krüger" wrote:

 Thank you, but there is another problem I encountered (I got the DirectX 8.1
 SDK):

 When I compile the example-code from

     samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice

 DMC compiles the code, so that it want a function called

     _Direct3DCreate8 4

 which is available in th MS .lib-file, but not in the converted one.

 Is there any solution for this problem (or is this one of the functions
 which don't work)?

 Can you (or anyone else) give me a short sample, how to start with DirectX?

 thanx

 Ronny Krüger

 Nic Tiger <nictiger pt.comcor.ru> schrieb in im Newsbeitrag:
 ahcbf1$2ve7$1 digitaldaemon.com...
 You can get .lib files from MS DIRECTX SDK (or from Borland C Builder 5)

 convert them to OMF format. Then you have to get .H files from the same

 (or, again, from Builder).

 If you use limited set of DirectX functions, can build .lib yourself from
 .DLL using implib.exe utility.

 It's enough. I built DirectX 7 application using DMC pretty easy.
 I think if you take DirectX 8 SDK, you can also build DirectX 8

 Nic Tiger.


Jul 21 2002
prev sibling parent reply "Nic Tiger" <nictiger pt.comcor.ru> writes:
As for me, I can see mentioned symbol (_Direct3DCreate8 4) in converted lib.
I convert it like 'coff2omf d3d8.lib'

But anyway, if you have any troubles with converting import libraries, you
can build these libraries by yourself (like I did for DirectX 7).

I used Borland C Builder's impdef utility (attached) to create .DEF file
from .DLL.
Then I modified .DEF file so that first column contained mangled names (i.e.
_Direct3DCreate8 4 instead of Direct3DCreate8) and ran implib utility.
Sample .DEF file for DirectX 7 (ddraw.dll) is attached.

One more note. Place converted libs in your current (tutorial's folder) or
dm/lib folder.
Compile tutorial with this command line:

  sc -I\DX8_SDK\Include CreateDevice.cpp d3d8.lib

where -I points to your SDK.

Note that we include d3d8.lib into command line. This tells linker to pull
this lib in. Otherwise it will not be used (because it is not standard lib
to link with).

"Ronny Krüger" <rk_DarkAngel freenet.de> wrote in message
news:ahf2i4$2g7i$1 digitaldaemon.com...
 Thank you, but there is another problem I encountered (I got the DirectX

 SDK):

 When I compile the example-code from

     samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice

 DMC compiles the code, so that it want a function called

     _Direct3DCreate8 4

 which is available in th MS .lib-file, but not in the converted one.

 Is there any solution for this problem (or is this one of the functions
 which don't work)?

 Can you (or anyone else) give me a short sample, how to start with

 thanx

 Ronny Krüger


 Nic Tiger <nictiger pt.comcor.ru> schrieb in im Newsbeitrag:
 ahcbf1$2ve7$1 digitaldaemon.com...
 You can get .lib files from MS DIRECTX SDK (or from Borland C Builder 5)

 convert them to OMF format. Then you have to get .H files from the same

 (or, again, from Builder).

 If you use limited set of DirectX functions, can build .lib yourself


 .DLL using implib.exe utility.

 It's enough. I built DirectX 7 application using DMC pretty easy.
 I think if you take DirectX 8 SDK, you can also build DirectX 8

 Nic Tiger.


<<***Attachment IMPDEF.ZIP removed! Jan Knepper***>>
Jul 21 2002
next sibling parent reply Jan Knepper <jan smartsoft.cc> writes:
Nic,

You can NOT submit copyrighted material to this newsgroup!

Jan



Nic Tiger wrote:

 As for me, I can see mentioned symbol (_Direct3DCreate8 4) in converted lib.
 I convert it like 'coff2omf d3d8.lib'

 But anyway, if you have any troubles with converting import libraries, you
 can build these libraries by yourself (like I did for DirectX 7).

 I used Borland C Builder's impdef utility (attached) to create .DEF file
 from .DLL.
 Then I modified .DEF file so that first column contained mangled names (i.e.
 _Direct3DCreate8 4 instead of Direct3DCreate8) and ran implib utility.
 Sample .DEF file for DirectX 7 (ddraw.dll) is attached.

 One more note. Place converted libs in your current (tutorial's folder) or
 dm/lib folder.
 Compile tutorial with this command line:

   sc -I\DX8_SDK\Include CreateDevice.cpp d3d8.lib

 where -I points to your SDK.

 Note that we include d3d8.lib into command line. This tells linker to pull
 this lib in. Otherwise it will not be used (because it is not standard lib
 to link with).

 "Ronny Krüger" <rk_DarkAngel freenet.de> wrote in message
 news:ahf2i4$2g7i$1 digitaldaemon.com...
 Thank you, but there is another problem I encountered (I got the DirectX

 SDK):

 When I compile the example-code from

     samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice

 DMC compiles the code, so that it want a function called

     _Direct3DCreate8 4

 which is available in th MS .lib-file, but not in the converted one.

 Is there any solution for this problem (or is this one of the functions
 which don't work)?

 Can you (or anyone else) give me a short sample, how to start with

 thanx

 Ronny Krüger


 Nic Tiger <nictiger pt.comcor.ru> schrieb in im Newsbeitrag:
 ahcbf1$2ve7$1 digitaldaemon.com...
 You can get .lib files from MS DIRECTX SDK (or from Borland C Builder 5)

 convert them to OMF format. Then you have to get .H files from the same

 (or, again, from Builder).

 If you use limited set of DirectX functions, can build .lib yourself


 .DLL using implib.exe utility.

 It's enough. I built DirectX 7 application using DMC pretty easy.
 I think if you take DirectX 8 SDK, you can also build DirectX 8

 Nic Tiger.


Name: IMPDEF.ZIP IMPDEF.ZIP Type: WinZip File (application/x-unknown-content-type-WinZip) Encoding: x-uuencode LIBRARY DDRAW.DLL EXPORTS _AcquireDDThreadLock 0 = AcquireDDThreadLock ; AcquireDDThreadLock _D3DParseUnknownCommand = D3DParseUnknownCommand ; D3DParseUnknownCommand _DDGetAttachedSurfaceLcl = DDGetAttachedSurfaceLcl ; DDGetAttachedSurfaceLcl _DDInternalLock 8 = DDInternalLock ; DDInternalLock _DDInternalUnlock 4 = DDInternalUnlock ; DDInternalUnlock _DSoundHelp = DSoundHelp ; DSoundHelp _DirectDrawCreate 12 = DirectDrawCreate ; DirectDrawCreate _DirectDrawCreateClipper 12 = DirectDrawCreateClipper ; DirectDrawCreateClipper _DirectDrawCreateEx 16 = DirectDrawCreateEx ; DirectDrawCreateEx _DirectDrawEnumerateA 8 = DirectDrawEnumerateA ; DirectDrawEnumerateA _DirectDrawEnumerateExA = DirectDrawEnumerateExA ; DirectDrawEnumerateExA _DirectDrawEnumerateExW = DirectDrawEnumerateExW ; DirectDrawEnumerateExW _DirectDrawEnumerateW 8 = DirectDrawEnumerateW ; DirectDrawEnumerateW _DllCanUnloadNow 0 = DllCanUnloadNow ; DllCanUnloadNow _DllGetClassObject 12 = DllGetClassObject ; DllGetClassObject _GetDDSurfaceLocal = GetDDSurfaceLocal ; GetDDSurfaceLocal _GetOLEThunkData = GetOLEThunkData ; GetOLEThunkData _GetSurfaceFromDC = GetSurfaceFromDC ; GetSurfaceFromDC _RegisterSpecialCase = RegisterSpecialCase ; RegisterSpecialCase _ReleaseDDThreadLock 0 = ReleaseDDThreadLock ; ReleaseDDThreadLock

Jul 21 2002
parent "Nic Tiger" <nictiger pt.comcor.ru> writes:
Oops! I will not in the future. Excuse me.

"Jan Knepper" <jan smartsoft.cc> wrote in message
news:3D3B2269.138B457E smartsoft.cc...
 Nic,

 You can NOT submit copyrighted material to this newsgroup!

 Jan



 Nic Tiger wrote:

 As for me, I can see mentioned symbol (_Direct3DCreate8 4) in converted


 I convert it like 'coff2omf d3d8.lib'

 But anyway, if you have any troubles with converting import libraries,


 can build these libraries by yourself (like I did for DirectX 7).

 I used Borland C Builder's impdef utility (attached) to create .DEF file
 from .DLL.
 Then I modified .DEF file so that first column contained mangled names


 _Direct3DCreate8 4 instead of Direct3DCreate8) and ran implib utility.
 Sample .DEF file for DirectX 7 (ddraw.dll) is attached.

 One more note. Place converted libs in your current (tutorial's folder)


 dm/lib folder.
 Compile tutorial with this command line:

   sc -I\DX8_SDK\Include CreateDevice.cpp d3d8.lib

 where -I points to your SDK.

 Note that we include d3d8.lib into command line. This tells linker to


 this lib in. Otherwise it will not be used (because it is not standard


 to link with).

 "Ronny Kr?ger" <rk_DarkAngel freenet.de> wrote in message
 news:ahf2i4$2g7i$1 digitaldaemon.com...
 Thank you, but there is another problem I encountered (I got the



 8.1
 SDK):

 When I compile the example-code from

     samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice

 DMC compiles the code, so that it want a function called

     _Direct3DCreate8 4

 which is available in th MS .lib-file, but not in the converted one.

 Is there any solution for this problem (or is this one of the



 which don't work)?

 Can you (or anyone else) give me a short sample, how to start with

 thanx

 Ronny Kr?ger


 Nic Tiger <nictiger pt.comcor.ru> schrieb in im Newsbeitrag:
 ahcbf1$2ve7$1 digitaldaemon.com...
 You can get .lib files from MS DIRECTX SDK (or from Borland C




 and
 convert them to OMF format. Then you have to get .H files from the




 SDK
 (or, again, from Builder).

 If you use limited set of DirectX functions, can build .lib yourself


 .DLL using implib.exe utility.

 It's enough. I built DirectX 7 application using DMC pretty easy.
 I think if you take DirectX 8 SDK, you can also build DirectX 8

 Nic Tiger.


Name: IMPDEF.ZIP IMPDEF.ZIP Type: WinZip File


              Encoding: x-uuencode

 LIBRARY     DDRAW.DLL

 EXPORTS
     _AcquireDDThreadLock 0        = AcquireDDThreadLock


     _D3DParseUnknownCommand       = D3DParseUnknownCommand


     _DDGetAttachedSurfaceLcl      = DDGetAttachedSurfaceLcl


     _DDInternalLock 8             = DDInternalLock


     _DDInternalUnlock 4           = DDInternalUnlock


     _DSoundHelp                   = DSoundHelp


     _DirectDrawCreate 12          = DirectDrawCreate


     _DirectDrawCreateClipper 12   = DirectDrawCreateClipper


     _DirectDrawCreateEx 16        = DirectDrawCreateEx


     _DirectDrawEnumerateA 8       = DirectDrawEnumerateA


     _DirectDrawEnumerateExA       = DirectDrawEnumerateExA


     _DirectDrawEnumerateExW       = DirectDrawEnumerateExW


     _DirectDrawEnumerateW 8       = DirectDrawEnumerateW


     _DllCanUnloadNow 0            = DllCanUnloadNow


     _DllGetClassObject 12         = DllGetClassObject


     _GetDDSurfaceLocal            = GetDDSurfaceLocal


     _GetOLEThunkData              = GetOLEThunkData


     _GetSurfaceFromDC             = GetSurfaceFromDC


     _RegisterSpecialCase          = RegisterSpecialCase


     _ReleaseDDThreadLock 0        = ReleaseDDThreadLock



Jul 21 2002
prev sibling parent "Ronny Krüger" <rk_DarkAngel freenet.de> writes:
Thank you... I've found out why it didn't worked:

The DX8-Lib-Files are in a newer format (as described in the DMC-Manual of
coff2omf).
I've used MS link.exe to convert them first and the coff2omf.

The examples I've tested also work fine.


Nic Tiger <nictiger pt.comcor.ru> schrieb in im Newsbeitrag:
ahf6f2$2k3b$1 digitaldaemon.com...
 As for me, I can see mentioned symbol (_Direct3DCreate8 4) in converted

 I convert it like 'coff2omf d3d8.lib'

 But anyway, if you have any troubles with converting import libraries, you
 can build these libraries by yourself (like I did for DirectX 7).

 I used Borland C Builder's impdef utility (attached) to create .DEF file
 from .DLL.
 Then I modified .DEF file so that first column contained mangled names

 _Direct3DCreate8 4 instead of Direct3DCreate8) and ran implib utility.
 Sample .DEF file for DirectX 7 (ddraw.dll) is attached.

 One more note. Place converted libs in your current (tutorial's folder) or
 dm/lib folder.
 Compile tutorial with this command line:

   sc -I\DX8_SDK\Include CreateDevice.cpp d3d8.lib

 where -I points to your SDK.

 Note that we include d3d8.lib into command line. This tells linker to pull
 this lib in. Otherwise it will not be used (because it is not standard lib
 to link with).

Jul 22 2002