Buiding Blitz3D from source

Blitz3D Forums/Blitz3D Programming/Buiding Blitz3D from source

EricE(Posted February) [#1]
I am starting a project to build Blitz3D from the source code.

DirectX is required in order to build Blitz3D, but which version?

Version 7 has been recommended, but I have been informed that version 8.1 won't.

The problem is that DirectX7 reports errors when installing on Windows 7 (very likely also in Windows 10), but DX81 will install on both Win7 and Win10 without reporting errors.


xlsior(Posted February) [#2]
It needs at least DX7 -- also works perfectly fine in DX9, which most games use.


EricE(Posted March) [#3]
Hi xlsior,

From what I have read on the internet, the last version of DX9 that worked with VC6 was the October 2004 release, and even then the libraries supporting VC6 were put in a separately downloaded "extras" file. It also turns out that an essential header file, basetsd.h, was removed from the DirectX includes folder.

For the DX7 SDK I found it at the Wayback archives.org site.
https://archive.org/details/MicrosoftDirectX7SDK


RemiD(Posted March) [#4]
take a look at post #60, #61, #62, here : http://www.blitzbasic.com/Community/posts.php?topic=105408


EricE(Posted March) [#5]
Thanks RemiD.


BlitzSupport(Posted March) [#6]
Didn't Ploppy update it for building on modern Windows? I just used VirtualBox with either Windows XP or 2000, with VS6 (I think?).


EricE(Posted March) [#7]
The DirectX 8.1 SDK, archived from the original Microsoft server, is at the Wayback site.

http://web.archive.org/web/20040108202259/http://download.microsoft.com/download/whistler/dx/8.1/W982KMeXP/EN-US/DX81SDK_FULL.exe

The download location seems to be either too long or too complicated to make into a link.


EricE(Posted March) [#8]
Didn't Ploppy update it for building on modern Windows? I just used VirtualBox with either Windows XP or 2000, with VS6 (I think?).

I have built BlitzPlus and Blitz3D on two Windows 10 computers, one running 64-bit Windows and the other 32-bit Windows using the code downloaded from GitHub.


EricE(Posted March) [#9]
I have found a forum on which someone posted links for the last DirectX 9 release that was compatible with VC6. Since that is the only place I found where one can still download it I will post a link to the thread.
Beta Archive - [Request] DirectX 9 2004 SDKs

The files to download are:
dxsdk_oct2004.exe
dxsdk_oct2004_extras.exe (contains the VC6 compatible libraries)

In this release Microsoft removed the necessary basetsd.h header file from the DirectX include folder, so that will have to be fixed before building the Blitz source code.


EricE(Posted March) [#10]
The Microsoft Visual C++ 6.0 compiler is required to build BlitzPlus and Blitz3D. This compiler was included in Microsoft's Visual Studio 6.0 Suite, and both the Enterprise and Professional versions of Visual Studio may be downloaded from the WinWorldPC site.
https://winworldpc.com/product/microsoft-visual-stu/60

Microsoft still offers Service Pack 6 (SP6).
Service Pack 6 for Visual Basic 6.0, Visual C++ 6.0 with Visual Source Safe 6.0d


kfprimm(Posted March) [#11]
I have a bit of experience with this ( https://github.com/kfprimm/blitz3d-ng ).

Download Visual Studio 2015 (or 2017) Community Edition. It includes MFC, so you can build the IDE & debugger. You'll have to "upgrade" the project files, but it's trivial.

I ended up discovering I didn't need any of the old DirectX SDKs. Just the "DXFile" library. (You can grab the header & lib file from https://github.com/kfprimm/blitz3d-ng/tree/master/common ).

Also, I upgraded to DirectInput8 as well. That may have been to remove the DX7/9 SDK dependency. You can check out the code for reference: https://github.com/kfprimm/blitz3d-ng/tree/master/input.directinput8. It's slightly restructured, but it should contain enough hints if you get stuck.


EricE(Posted March) [#12]
Thanks kfprimm,
I am downloading your blitz3d-ng project.

May I ask if you have fixed the "DirectPlay prompting to install" issue that has been mentioned quite often in the BlitzBasic forums?


kfprimm(Posted March) [#13]
Ok, cool. There were a few tweaks I had to make to get the source compiling on VS2015, but nothing major. Most renaming functions.

Yeah, I just removed the DirectPlay commands. :) I'd like to eventually reimplement them with UDP/TCP commands just for fun, but I haven't had much time to work on it lately so my time has gone into playing around with LLVM to see if the compiler can spit out working programs on macOS/Linux.


EricE(Posted March) [#14]
After spending a lot of time searching the internet for information about DirectX I found two items that might be of interest to members of the forum.

The first is a pdf document, "Game Development with DirectX 9"
http://www.few.vu.nl/~eliens/design/@...
This document contains information about setting up VC6 to use DirectX.

The second is a web page containing specific information on using DirectX 9.0c with VC6,
http://www.toymaker.info/Games/html/directx_9_0c.html
This is where I learned that the basetsd.h header file had been removed!
The toymaker site contain a lot of interesting information about DirectX

I am now going to concentrate on building kfprimm's Blitz3D-ng GitHub project.


kfprimm(Posted March) [#15]
Let me know you if you need any help or if I could improve the README in any way.


EricE(Posted March) [#16]
kfprimm, I will let you know what happens.


EricE(Posted March) [#17]
I was able to successfully build the Blitz3D-ng project using Visual Studio 2015 pro.

kfprimm, you did a great job in making it easy to download and build using the git and premake tools, not to mention making it work using VS2015.