Pelles C forum

C language => User contributions => Topic started by: frankie on June 03, 2016, 08:31:26 PM

Title: PHE - PellesC Headers extension project [UPDATE 08.16.2016]
Post by: frankie on June 03, 2016, 08:31:26 PM
This is collection of headers missing or outdated for PellesC compiler.
To use them in your programs you can manually copy them in the compiler include\win directory from ZIP distribution, or, and this is the suggested way, use the installer.

08.16.2016
Thanks to Timo, fixed file "d3d10effect.h". A comma was missing in  enum _D3D10_DEVICE_STATE_TYPES.

06.11.2016:
For John's happiness added Ddraw.lib for 32 and 64 bits (SDK  V7.1)  ;)
P.S. Available only in the setup.

06.05.2016:
Small fixings

06.04.2016:
07.28.2015:

03.29.2015:

03.28.2015:

03.22.2015:
Title: Re: PHE - PellesC Headers extension project [UPDATE 05.03.2016]
Post by: JohnF on June 10, 2016, 04:03:18 PM
You've been busy!

Thanks.

John

Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: frankie on June 11, 2016, 08:55:06 PM
Yes John I've been busy ;), and for your joy I have just added the 32 and 64 bits ddraw.lib.
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: JohnF on June 12, 2016, 06:42:23 AM
Yes John I've been busy ;), and for your joy I have just added the 32 and 64 bits ddraw.lib.

Very good!

I've been able to resurrect some old 2D DX stuff but the D3D stuff is proving much more difficult.

John
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: frankie on June 12, 2016, 12:07:24 PM
What you miss John?
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: JohnF on June 12, 2016, 12:35:05 PM
Well it's not what is missing, yet!

An old demo from M.S. 'Dolphin' which I converted from C++ compiled fine with lcc_win32, never have I been able to get it to compile with PellesC.

Here is an example of which there are many:

error #2152: Unknown field 'DeleteVertexShader' of 'struct IDirect3DDevice8' (did you mean 'lpVtbl'?).

which appertains to this line of code

Code: [Select]
IDirect3DDevice8_DeleteVertexShader(gD3DApp.pD3DDevice, g_dwDolphinVertexShader);
EDIT: the definition in the header is
Code: [Select]
#define IDirect3DDevice8_DeleteVertexShader(p,a) (p)->DeleteVertexShader(a)
John
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: frankie on June 12, 2016, 01:29:39 PM
Hello John,
could you post the project?
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: JohnF on June 12, 2016, 01:50:17 PM
Hello John,
could you post the project?

Sure.

John
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: frankie on June 13, 2016, 01:10:23 AM
John add this line
Code: [Select]
#define COBJMACROS 1before the very first directx header to enable the macros.
I think that DirectX8 is no more supported on Win7, you should use DirectX9 instead.
I played a little with headers, but is not easy because of redefines that evidently are not a problem for VC  :(
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: JohnF on June 13, 2016, 08:13:10 AM
John add this line
Code: [Select]
#define COBJMACROS 1before the very first directx header to enable the macros.
I think that DirectX8 is no more supported on Win7, you should use DirectX9 instead.
I played a little with headers, but is not easy because of redefines that evidently are not a problem for VC  :(

DX is a nightmare, at least most of the Windows APIs stayed the same through all versions of the OS.
 
Attached is the exe is anyone is interested to know what it looked like running.

John
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: frankie on June 13, 2016, 02:54:00 PM
John
Try this  ;)
(Maybe now I know what to do...)
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: frankie on June 13, 2016, 02:54:31 PM
And 2nd part...
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: JohnF on June 13, 2016, 03:04:21 PM
I certainly works, what have you done?

EDIT: Anyway, very well done!

John
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: frankie on June 13, 2016, 04:56:48 PM
Just downloaded the directx8 sdk and selected the required headers and libs.
The library Myd3d8.lib is the standard d3d8.lib from the sdk I renamed it to avoid linking against your d3d8.lib that strangely seems to miss Direct3DCreate8.
Yo can rename it d3d8.lib.
The headers are that of the last setup above.  ;)
When I'll have time I'll try to integrate DirectX8 in extensions distribution.
Title: Re: PHE - PellesC Headers extension project [UPDATE 06.11.2016]
Post by: JohnF on June 13, 2016, 04:58:43 PM
Ok, thanks much.

John