User forums > Using Code::Blocks

DirectX 8 & 9

(1/3) > >>

MrTAToad:
Hello

Is it possible to somehow use DirectX 8 & 9 with Code::Blocks.  The problem is the VS Toolkit compiler doesn't come with the D3D8x lirbrary files or headers.  Unfortunately downloading the DX8 SDK doesn't help as a) it complains about LIBC (and various windows libraries), and if they are ignored, then you get errors complaining about various STL errors (for some reason) - I'll add the exact error messages when I get home.

Using VS7 headers and libraries, and all is fine of course - unfortunately its not exactly legal to use those instead of the Platform SDK.

I'm trying to get DarkSDK (up and running with said editor - works fine in VS 2003).  Unfortunately to complicate matters the multiplayer system is DX8 and the rest is DX9- hence the reason why both versions of DirectX are needed.


rickg22:
What "complaints" about the libc?

It seems to me that you're using the wrong headers / libraries at some point... maybe (MAYBE) you got mixed the included MINGW c headers...
(But then again, i'm no VC expert, since all my compiling is done using mingw...)

MrTAToad:
Not using MINGW - its Microsoft all the way...

However, you are correct in that the libraries are the problem - unfortunately the DX8 headers & libraries in VS 2003 are different from those in the SDK, and whilst the former ones work fine, the latter dont.

Which would be no problem if it was legal to distribute said headers and libraries...  Which its not :(

Unfortunately I cant put the errors here as my Mums using my machine - hopefully it can be done either later or tomorrow - if not Ill have to wait a week.

grv575:
Well do post the errors (make sure you set the option to show the full commandline too).  I've worked out most vc++ issues with compiling things and you can sometimes even build a missing .lib file.  See the wiki: http://wiki.codeblocks.org/index.php/FAQ#I_can.27t_compile_a_multithreaded_app_with_VC_Toolkit.21_Where_are_the_libraries.3F
as well for libraries which you need to consider when using vc++ toolkit.  I don't know if there are actually some things that won't compile or no.  I tried compiling WinMerge cvs (and the msvc importer worked great :) ) and the only thing I couldn't get past was not having mfc42s.lib or something -- it looks like for the handhelp (CE) version of MFC they split the runtime dll up, but not so for the desktop version.  WinMerge was still compiling against this CE "helper" lib which I couldn't figure out why, and it wouldn't link without it either.  So it is possible that some things might be missing but I've heard positive things about getting directx working with just the vc++ toolkit.

MrTAToad:
The compiler reports thus :

Project   : Win32 Application
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Documents and Settings\Jacky\My Documents\
--------------------------------------------------------------------------------
Switching to target: default
link.exe /nologo /subsystem:windows    /LIBPATH:"C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Lib\x86" /LIBPATH:"C:\Program Files\Microsoft Platform SDK\Lib" /LIBPATH:"C:\Program Files\The Game Creators\Dark Game SDK - FREEWARE Edition\Lib\VS7" /LIBPATH:"C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib" /LIBPATH:"C:\Documents and Settings\Jacky\Local Settings\Temp\DXF\DXSDK\lib" /out:"C:\Documents and Settings\Jacky\My Documents\Win32GUI.exe"   gdi32.lib user32.lib kernel32.lib  .objs\main.obj     
basic3D.lib(ProcessHSR.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
convx.lib(ConvX.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
convmd3.lib(ConvMD3.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
convmdl.lib(ConvMDL.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
basic3D.lib(CCompiler.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
basic3D.lib(NVMeshMenderD3DX.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
world.lib(Patch.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
multiplayer.lib(CNetwork.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
system.lib(dxdiaginfo.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
basic3D.lib(Universe.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)
basic3D.lib(DBOFormat.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
basic3D.lib(cLightMaps.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
basic3D.lib(CBSPTree.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
basic3D.lib(ProcessHSR.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
convx.lib(ConvX.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
convmd3.lib(ConvMD3.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
convmdl.lib(ConvMDL.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
basic3D.lib(CCompiler.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
basic3D.lib(NVMeshMenderD3DX.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
world.lib(Patch.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
multiplayer.lib(CNetwork.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
system.lib(dxdiaginfo.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
basic3D.lib(Universe.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ) referenced in function "protected: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z)
basic3D.lib(DBOFormat.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
basic3D.lib(cLightMaps.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
basic3D.lib(CBSPTree.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
C:\Documents and Settings\Jacky\My Documents\Win32GUI.exe : fatal error LNK1120: 2 unresolved externals
Process terminated with status 1 (0 minutes, 1 seconds)

DXF is the path to DX8 SDK

As I said before everything is fine with VS 2003 headers and libraries (and there are differences between DX8 there and in the SDK), which is probably the problem (and/or the non-free libraries are needed).

Navigation

[0] Message Index

[#] Next page

Go to full version