Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Using the Visual Toolkit with DarkSDK

Author
Message
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 29th Aug 2005 23:03 Edited at: 30th Aug 2005 00:06
You can certainly use the Visual Studio ToolKit (availible at http://www.microsoft.com/downloads/thankyou.aspx?familyId=272BE09D-40BB-49FD-9CB0-4BFA122FA91B&displayLang=en). However, you will also need to download the Platform SDK (availiable at http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en).
Neither of these are small, so be prepared for a big download.

Now, we get to the important stuff... Assuming that you have installed (and updated) DarkSDK, you will need the folllowing batch code (ie copy and paste the text below and put it in a .BAT file) :

---------------------------------------------------------------------

---------------------------------------------------------------------
I will be including my batch file.

You can only compile programs after you have clicked on the Microsoft Visual C++ Toolkit Command Prompt.

Once at the command prompt, just type in the name of your batch file, and it should compile and link. At the moment, the commands for optimisation haven't been included - you can add those later.


In your code you may need the following lines, before you #include "DarkSDK.h" :



Now, the details :

SET INCLUDE details the location of all the include files you will be needing - using absolute paths in your program isn't enough. The basic order detailed should be kept. You will need to replace my PlatformSDK path with yours.

SET LIB details the location of all the library files to be used. Again, keep the order I have given.

CL compiles the source code. I have kept it simple and only detailed one source file. The object file is current Release. Run CL /? at the command progam to see all availiable options.

LINK links the object file to create the executable. The options tell the link to compile to a 32-bit Intel compatiable Windows executable.

In your code you may need the following lines, before you #include "DarkSDK.h" :



The total output should be something like :



Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk

Attachments

Login to view attachments
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 30th Aug 2005 10:17
Of course, having to use the SET command each time is inefficient.

The compiler command line calls a batch file (something like vsvars32.bat). In that file the paths (include, file and library) are set, and where the paths to the Platform SDK, DirectX and the SDK should bet set.

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 30th Aug 2005 11:16 Edited at: 30th Aug 2005 11:34
Now, IDE's...

As the Toolkit is a cheap way of getting a compiler, it doesn't of course come with an IDE.

Therefore, you have two choices : Either use Notepad for everyone or use a free editor - see http://www.mobilefish.com/developer/eclipse/eclipse_quickguide_vctoolkit2003.html
for more details or
http://www.codeblocks.org/ and http://wiki.codeblocks.org/index.php/Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
John Y
Synergy Editor Developer
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 30th Aug 2005 22:16
Nice information there Bouncy.

Synergy IDE will have Dark SDK support in the next beta if you are interested in trying it out.

OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 31st Aug 2005 14:47 Edited at: 31st Aug 2005 20:27
Okay - now for the details of using Code::base.

When you come to install Code::base, you will be asked if you want to associate C/C++ files with it. If you have no other compilers setup, then I would most certainly do the association. However, if you do have other C/C++ compilers, it may be a good idea to say no.

Once it is installed, it should automatically detect the Toolkit. If it doesn't (or its not installed), the editor can be told to do a scan later on.

Before I deal with where to place the headers and library files, there is one important thing to note : At the moment, the current version of Code::base has an imense problem with code/projects on the root of the C: drive (and possibly any other drive as well). This means all code & projects must be in a directory, otherwise the compiler wont run for some reason. I have raised this issue with the program, but I dont know when/if it will be fixed.

The final layout should look something like :







Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 6th Sep 2005 06:18 Edited at: 6th Sep 2005 07:59
I have found a problem with the need for the compiler to link atls.lib - unfortunately its not with the Platform SDK.

It might be a side effect of using the August DirectX (as its okay with the previous version), or possibly (as its the first time I have been able to get a whole Codebase::system running), it was something that I missed due to using the VC7 headers & libraries

The only way to solve, it seems, would be to either try and ignore the library or extract a version from say, the VS 2002 update.

Another problem will be the D3DX8.LIB file... It appears that the only way to solve these problems is to use the VS 2003 headers & libraries

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
MiR
21
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 8th Sep 2005 18:32
So the bottom line is it isnĀ“t possible? Need any help? I knw nothing about ides but I could try downloading and installing stuff until it works.


Thank you for the votez!1!
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Sep 2005 00:01 Edited at: 9th Sep 2005 10:25
It sounds like its not possible due to missing LIB files in the Platform SDK.

Some Microsoft custom files are also required (which aren't availiable in the Platform SDK) and DX8 (which is extremely hard to find now).

I would like to see (during the upgrade), for DBPro to go wholely to DX9 - after which it should be easier to deal with.

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
MiR
21
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 9th Sep 2005 16:16
That still leaves the custum files though. Maybe if they compile those missing files into the DGSDK libs. Perhaps in a ToolKit compatible lib? Is that legal? Probably not.

My signature has been erased by me because it's LARGE.
Thank you for the votez!1!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Sep 2005 21:47
The atls.lib file is a part of the ATL library, which is a part (IIRC) of the MFC library - isn't that a part of the SDK? It's certainly a part of the VS installation.

Generally, MS allow the distribution of 'redistributable' files (ie, dll's), but static libraries aren't in that category - they may take exception to those files being distributed.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th Sep 2005 23:52 Edited at: 10th Sep 2005 23:54
Only the 64 bit version is availiable in the SDK - but thats the least of the problems - there are a whole load of MFC errors too...

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk

Login to post a reply

Server time is: 2024-11-19 02:36:08
Your offset time is: 2024-11-19 02:36:08