PDA

View Full Version : CodeGear C++ Builder and DirectX 9



Smartzkid
05-12-2008, 10:21 PM
Well, here's the situation: I have CodeGear C++ Builder, and I want to start working with DirectX. Only problem is this: DirectX Libs use a different format than the Borland libs (DX uses the Microsoft COFF format, and the compiler needs the Borland OFF? format). Does anyone have experience, recommendations, help, anything for me?

I'd rather not have to switch IDEs, but if I have to, what do you recommend?

boberman
05-13-2008, 12:25 AM
Well, you have to switch compilers (sorry) the Borland IDE has been out of production for a long time (I believe, at least it was, maybe they have brought it back). You're best bet is to go with Microsoft Visual Studios Express, Free without many limitations. Your next best bet is Dev-C++. Your third bet is to switch to Open-GL.

Good luck.

Bobarkinator
05-13-2008, 12:14 PM
Microsoft Visual C++ is a great IDE at the downfall of being by Microsoft and closed-source.

Smartzkid
05-15-2008, 01:32 AM
FYI, money doesn't matter, I'll buy it or find a way to get it.

Going to install VS 2008; I'm hoping to be able to be able to set the IDE up with the Microsoft compiler.

boberman
05-15-2008, 02:55 AM
Visual studios express is free and basically has all the feature the full version has. So no need to "Find other ways" to get it :)

R0b0t1
05-16-2008, 12:41 AM
GCC

Period.

Exclamation!

Question Mark?

Bobarkinator
05-17-2008, 02:43 PM
GCC is teh best. I wish I could get the GCC compiler on Visual C++

boberman
05-20-2008, 01:59 PM
GCC is teh best. I wish I could get the GCC compiler on Visual C++

You can. Just download the MingW GCC and point the Visual studios compiler to the gcc compiler. You might need to point visual studios to the mingW includes and libraries as well, but it is definitely doable.

Bobarkinator
05-20-2008, 04:31 PM
I might try it. But the more I use Dev c++ the more I like it.

Smartzkid
05-22-2008, 02:01 AM
Got VS and it's working great!

Heh, Now I can make little spinning triangles!! Yay! :p

R0b0t1
05-22-2008, 02:14 AM
Use Code::Blocks. Supports GCC, and its kick-ass.

Smartzkid
05-22-2008, 09:14 PM
...and has terrible code completion.

Bobarkinator
05-23-2008, 03:12 PM
...and has terrible code completion.

I tried it and noticed the exact same thing. I would still have to say that Eclipse has the best code completion, but their c++ ide isn't very good, or maybe it was because I was just starting out. Who knows....

Smartzkid
05-26-2008, 03:16 AM
Using Visual Studio Express '08 until I get to try out the Eclipse IDE.

EDIT: Aaah. I need Microsoft Platform SDK. Disregard the stuff below.

EDIT: I give up for now, will try again tomorrow (stubborn much?)

Here's what I get from the Debug config:

1>------ Build started: Project: LegoRPG, Configuration: Debug Win32 ------
1>Linking...
1>LegoRPG.obj : error LNK2020: unresolved token (0A00000F) IID_IMediaEvent
1>LegoRPG.obj : error LNK2028: unresolved token (0A000010) "extern "C" void __stdcall CoUninitialize(void)" (?CoUninitialize@@$$J10YGXXZ) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>LegoRPG.obj : error LNK2020: unresolved token (0A000012) IID_IMediaControl
1>LegoRPG.obj : error LNK2020: unresolved token (0A000013) IID_IBasicAudio
1>LegoRPG.obj : error LNK2020: unresolved token (0A000014) IID_IMediaSeeking
1>LegoRPG.obj : error LNK2020: unresolved token (0A000016) CLSID_FilterGraph
1>LegoRPG.obj : error LNK2020: unresolved token (0A000017) IID_IGraphBuilder
1>LegoRPG.obj : error LNK2028: unresolved token (0A000018) "extern "C" long __stdcall CoCreateInstance(struct _GUID const &,struct IUnknown *,unsigned long,struct _GUID const &,void * *)" (?CoCreateInstance@@$$J220YGJABU_GUID@@PAUIUnknown @@K0PAPAX@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>LegoRPG.obj : error LNK2028: unresolved token (0A000019) "extern "C" long __stdcall CoInitializeEx(void *,unsigned long)" (?CoInitializeEx@@$$J18YGJPAXK@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IMediaEvent
1>LegoRPG.obj : error LNK2019: unresolved external symbol "extern "C" void __stdcall CoUninitialize(void)" (?CoUninitialize@@$$J10YGXXZ) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IMediaControl
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IBasicAudio
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IMediaSeeking
1>LegoRPG.obj : error LNK2019: unresolved external symbol "extern "C" long __stdcall CoCreateInstance(struct _GUID const &,struct IUnknown *,unsigned long,struct _GUID const &,void * *)" (?CoCreateInstance@@$$J220YGJABU_GUID@@PAUIUnknown @@K0PAPAX@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IGraphBuilder
1>LegoRPG.obj : error LNK2001: unresolved external symbol CLSID_FilterGraph
1>LegoRPG.obj : error LNK2019: unresolved external symbol "extern "C" long __stdcall CoInitializeEx(void *,unsigned long)" (?CoInitializeEx@@$$J18YGJPAXK@Z) referenced in function "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>D:\Documents and Settings\Owner\My Documents\Visual Studio 2008\Projects\LegoRPG\Debug\LegoRPG.exe : fatal error LNK1120: 18 unresolved externals
1>Build Time 0:00
1>Build log was saved at "file://d:\Documents and Settings\Owner\My Documents\Visual Studio 2008\Projects\LegoRPG\LegoRPG\Debug\BuildLog.htm"
1>LegoRPG - 19 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


And the release config:

1>------ Build started: Project: LegoRPG, Configuration: Release Win32 ------
1>Linking...
1>LegoRPG.obj : error LNK2001: unresolved external symbol "extern "C" long __stdcall CoInitializeEx(void *,unsigned long)" (?CoInitializeEx@@$$J18YGJPAXK@Z)
1>LegoRPG.obj : error LNK2001: unresolved external symbol "extern "C" long __stdcall CoCreateInstance(struct _GUID const &,struct IUnknown *,unsigned long,struct _GUID const &,void * *)" (?CoCreateInstance@@$$J220YGJABU_GUID@@PAUIUnknown @@K0PAPAX@Z)
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IGraphBuilder
1>LegoRPG.obj : error LNK2001: unresolved external symbol CLSID_FilterGraph
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IMediaSeeking
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IBasicAudio
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IMediaControl
1>LegoRPG.obj : error LNK2001: unresolved external symbol "extern "C" void __stdcall CoUninitialize(void)" (?CoUninitialize@@$$J10YGXXZ)
1>LegoRPG.obj : error LNK2001: unresolved external symbol IID_IMediaEvent
1>D:\Documents and Settings\Owner\My Documents\Visual Studio 2008\Projects\LegoRPG\Release\LegoRPG.exe : fatal error LNK1120: 9 unresolved externals
1>Build Time 0:00
1>Build log was saved at "file://d:\Documents and Settings\Owner\My Documents\Visual Studio 2008\Projects\LegoRPG\LegoRPG\Release\BuildLog.htm"
1>LegoRPG - 10 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



\/ Disregard.

EDIT: Figured out my problem (took about 3 days :p); don't waste your time reading past here (unless you want to?)

Don't much want to make a new thread for a small problem, so I'll ask here. I'm trying to use directshow inside a 'Windows Forms' project. Everything compiles fine, but during linking, I get a bunch of 'unresolved external symbol' errors. I assume that's a missing library, but I'm already linking against default & directX libraries; I can't figure out what I'm missing...

EDIT: Nevermind, i guess I didn't have the libraries properly linked. Ended up adding them all one at a time to VC++'s Linker's 'Additional Dependancies'. Is there a way to add a whole directory?