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)
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.
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)
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.
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
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)
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.
<<***Attachment IMPDEF.ZIP removed! Jan Knepper***>> begin 666 DDRAW.DEF M941$5&AR96%D3&]C:T P(" (" (" ]($%C<75I<F5$1%1H<F5A9$QO8VL M(" (" (" (" (" (#L 06-Q=6ER941$5&AR96%D3&]C:PT*(" (%]$ M=&%C:&5D4W5R9F%C94QC;" (" (" (" (" [($1$1V5T071T86-H9613 M/2!$1$EN=&5R;F%L3&]C:R (" (" (" (" (" (" (" [($1$26YT M/2!$1$EN=&5R;F%L56YL;V-K(" (" (" (" (" (" (" [($1$26YT M97)N86Q5;FQO8VL-"B ("!?1%-O=6YD2&5L<" (" (" (" (" (" M(" ]($13;W5N9$AE;' (" (" (" (" (" (" (" (" (#L 1%-O M1&ER96-T1')A=T-R96%T92 (" (" (" (" (" (" .R!$:7)E8W1$ M/2!$:7)E8W1$<F%W0W)E871E0VQI<'!E<B (" (" (" (" [($1I<F5C M-B (" (" /2!$:7)E8W1$<F%W0W)E871E17 (" (" (" (" (" M871E04 X(" (" (#T 1&ER96-T1')A=T5N=6UE<F%T94$ (" (" (" M(" (" .R!$:7)E8W1$<F%W16YU;65R871E00T*(" (%]$:7)E8W1$<F%W M16YU;65R871E17A!(" (" (#T 1&ER96-T1')A=T5N=6UE<F%T945X02 M<F5C=$1R87=%;G5M97)A=&5%>%< (" (" /2!$:7)E8W1$<F%W16YU;65R M871E17A7(" (" (" (" (" [($1I<F5C=$1R87=%;G5M97)A=&5%>%<- M"B ("!?1&ER96-T1')A=T5N=6UE<F%T95= ." (" (" ]($1I<F5C=$1R M87=%;G5M97)A=&57(" (" (" (" (" (#L 1&ER96-T1')A=T5N=6UE M;$-A;E5N;&]A9$YO=R (" (" (" (" (" (" (#L 1&QL0V%N56YL M/2!'971$1%-U<F9A8V5,;V-A;" (" (" (" (" (" (" [($=E=$1$ M(" /2!'971/3$54:'5N:T1A=&$ (" (" (" (" (" (" (" [($=E M(" (#T 1V5T4W5R9F%C949R;VU$0R (" (" (" (" (" (" .R!' M(%)E9VES=&5R4W!E8VEA;$-A<V4-"B ("!?4F5L96%S941$5&AR96%D3&]C M:T P(" (" (" ](%)E;&5A<V5$1%1H<F5A9$QO8VL (" (" (" (" ;(" (#L 4F5L96%S941$5&AR96%D3&]C:PT* ` end
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
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)
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.
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
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
 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)
 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.
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
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
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).
Jul 22 2002