Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become a C++ Expert!

Join 244,299 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 837 people online right now. Registration is fast and FREE... Join Now!




Using DirectX 9

 
Reply to this topicStart new topic

Using DirectX 9

Mr. O
9 Jan, 2009 - 06:41 AM
Post #1

New D.I.C Head
*

Joined: 30 Dec, 2008
Posts: 11

Is there any way that I can take the DirectX developers kit and use it in the bcc32 command line compiler?

Just Curious,
Mr. O

User is offlineProfile CardPM
+Quote Post


Mr. O
RE: Using DirectX 9
9 Jan, 2009 - 06:56 AM
Post #2

New D.I.C Head
*

Joined: 30 Dec, 2008
Posts: 11

I was reading a book that shows how to add it to visual c++ and it says that to get it to run the d3d9.lib file has to be added to the dependencies of the c++ library that the bcc32 compiler uses. How do you add this file to the list of dependencies?

Mr. O
User is offlineProfile CardPM
+Quote Post

KYA
RE: Using DirectX 9
9 Jan, 2009 - 06:58 AM
Post #3

#include <nerd.h>
Group Icon

Joined: 14 Sep, 2007
Posts: 9,508



Thanked: 363 times
Dream Kudos: 2550
Expert In: C, C++, Java

My Contributions
Its a several step process.

1. Install the SDK (this should put the necessary files in your C:\Program Files\Visual Studio\Include

2. Add the .lib files under Project Options->Linker->General

3. In your source use:

#include "headerName.h"
User is offlineProfile CardPM
+Quote Post

Mr. O
RE: Using DirectX 9
9 Jan, 2009 - 07:01 AM
Post #4

New D.I.C Head
*

Joined: 30 Dec, 2008
Posts: 11

I understand the first and third steps but the problem is that I have to modify the bcc32.cfg file to include the file. Keep in mind I am using a command line compiler and not borland c++ builder.
User is offlineProfile CardPM
+Quote Post

KYA
RE: Using DirectX 9
9 Jan, 2009 - 07:03 AM
Post #5

#include <nerd.h>
Group Icon

Joined: 14 Sep, 2007
Posts: 9,508



Thanked: 363 times
Dream Kudos: 2550
Expert In: C, C++, Java

My Contributions
Oh. Any chance of you picking up Visual Studio? smile.gif

edit: Are you using the command line to just compile? Your compiler has a directory somewhere that has an "Include" folder, etc...

This post has been edited by KYA: 9 Jan, 2009 - 07:04 AM
User is offlineProfile CardPM
+Quote Post

Mr. O
RE: Using DirectX 9
9 Jan, 2009 - 07:07 AM
Post #6

New D.I.C Head
*

Joined: 30 Dec, 2008
Posts: 11

I guess I could but the problem is that I have a slow internet connection right now and I am not familiar with the visual studio compiler. I also want programs that do not require the .net framework. I have found it to be a pain to install on my desktop and it is highly unreliable as far as I have found.
User is offlineProfile CardPM
+Quote Post

KYA
RE: Using DirectX 9
9 Jan, 2009 - 07:09 AM
Post #7

#include <nerd.h>
Group Icon

Joined: 14 Sep, 2007
Posts: 9,508



Thanked: 363 times
Dream Kudos: 2550
Expert In: C, C++, Java

My Contributions
What are you using to develop your source? That program should have linker settings of some nature.
User is offlineProfile CardPM
+Quote Post

Mr. O
RE: Using DirectX 9
9 Jan, 2009 - 07:16 AM
Post #8

New D.I.C Head
*

Joined: 30 Dec, 2008
Posts: 11

The compiler has a linker built into the set of files in the \BIN\ directory. When I pull up the compiler I get the following set of instructions:

Syntax is: BCC32 [ options ] file[s] * = default; -x- = turn switch x off
-3 * 80386 Instructions -4 80486 Instructions
-5 Pentium Instructions -6 Pentium Pro Instructions
-Ax Disable extensions -B Compile via assembly
-C Allow nested comments -Dxxx Define macro
-Exxx Alternate Assembler name -Hxxx Use pre-compiled headers
-Ixxx Include files directory -K Default char is unsigned
-Lxxx Libraries directory -M Generate link map
-N Check stack overflow -Ox Optimizations
-P Force C++ compile -R Produce browser info
-RT * Generate RTTI -S Produce assembly output
-Txxx Set assembler option -Uxxx Undefine macro
-Vx Virtual table control -X Suppress autodep. output
-aN Align on N bytes -b * Treat enums as integers
-c Compile only -d Merge duplicate strings
-exxx Executable file name -fxx Floating point options
-gN Stop after N warnings -iN Max. identifier length
-jN Stop after N errors -k * Standard stack frame
-lx Set linker option -nxxx Output file directory
-oxxx Object file name -p Pascal calls
-tWxxx Create Windows app -u * Underscores on externs
-v Source level debugging -wxxx Warning control
-xxxx Exception handling -y Produce line number info
-zxxx Set segment names

The following is what the bcc32.cfg file looks like:
-I"c:\Borland\Bcc55\include"
-L"c:\Borland\Bcc55\lib"

This post has been edited by Mr. O: 9 Jan, 2009 - 07:21 AM
User is offlineProfile CardPM
+Quote Post

Mr. O
RE: Using DirectX 9
9 Jan, 2009 - 07:24 AM
Post #9

New D.I.C Head
*

Joined: 30 Dec, 2008
Posts: 11

This is what the program says when it links the files into an exe file:
Turbo Incremental Link 5.00 Copyright © 1997, 2000 Borland
User is offlineProfile CardPM
+Quote Post

MorphiusFaydal
RE: Using DirectX 9
9 Jan, 2009 - 11:02 AM
Post #10

D.I.C Lover
Group Icon

Joined: 12 May, 2005
Posts: 1,349



Thanked: 31 times
Expert In: Hardware, Networking

My Contributions
For DirectX development, I really would recommend trying to get yourself a copy of Visual C++ 2008 Express Edition.

I believe the correct line to add to the .cfg would be
CODE
-I"C:\Program Files\Visual Studio\Include"
-L"C:\Program Files\Visual Studio\lib"


The \lib directory may be named something else, but it will be in the same general vicinity as the \Include folder.

Also note: those paths may vary depending on where you installed your DirectX SDK. smile.gif
User is offlineProfile CardPM
+Quote Post

Mr. O
RE: Using DirectX 9
9 Jan, 2009 - 07:28 PM
Post #11

New D.I.C Head
*

Joined: 30 Dec, 2008
Posts: 11

That should work I will repost if there is a problem. Unfortunitely the download I had stopped with only 5mb to go. I will retry and test this.

Mr. O
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic

Time is now: 7/4/09 05:13PM

Live C++ Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month