From: <ms...@wp...> - 2004-11-16 21:18:54
|
Hi, Probably MinGW mailing list would be better place to post this question, but I think Dev-C++ users have this problem too. Recently I wanted to use MinGW (3.3.1 with Dev-C++ 4.9.9.0) to write & compile game uses DirectX 9. When I wanted to use d3dx9.lib I had problem with convert it to format which is undestood by MinGW (http://www.mingw.org/mingwfaq.shtml#faq-msvcdll). From Google I know that many people had problem with this. Currently I use d3dx9d.lib, but this require to attach d3dx9d.dll to my program. I've found few threads about it, but there were little old. Is this problem still unsolved? Regards Marcin |
From: Aaron W. L. <aar...@aa...> - 2004-11-16 21:32:50
|
Marcin Zaj=B1czkowski wrote: > Recently I wanted to use MinGW (3.3.1 with Dev-C++ 4.9.9.0) to write &=20 > compile game uses DirectX 9. When I wanted to use d3dx9.lib I had=20 > problem with convert it to format which is undestood by MinGW=20 > (http://www.mingw.org/mingwfaq.shtml#faq-msvcdll). From Google I know=20 > that many people had problem with this. Currently I use d3dx9d.lib, but= =20 > this require to attach d3dx9d.dll to my program. No conversion is necessary. d3dx9.lib is not an import library; it is a normal archive of objects. However, there were in the past a few reasons that it wouldn't work. At least two of them have been resolved one way or another in the official sources, but I'm unsure of the present status. I have not attempted this in some time. I will review this again eventually. If you're trying to get it work, its actually 99% working, with just a few minor bugs or incompatibilities in the toolchain that prevent it from working out-of-the-box. With a little bit of time tracking down the problems in the usual fashion, you should be able to get it to work. Aaron W. LaFramboise |
From: <ms...@wp...> - 2004-11-17 19:02:13
|
Dnia 2004-11-16 22:34, Użytkownik Aaron W. LaFramboise napisał: > Marcin Zajączkowski wrote: > >>Recently I wanted to use MinGW (3.3.1 with Dev-C++ 4.9.9.0) to write & >>compile game uses DirectX 9. When I wanted to use d3dx9.lib I had >>problem with convert it to format which is undestood by MinGW >>(http://www.mingw.org/mingwfaq.shtml#faq-msvcdll). From Google I know >>that many people had problem with this. Currently I use d3dx9d.lib, but >>this require to attach d3dx9d.dll to my program. > > No conversion is necessary. d3dx9.lib is not an import library; it is a > normal archive of objects. > > However, there were in the past a few reasons that it wouldn't work. At > least two of them have been resolved one way or another in the official > sources, but I'm unsure of the present status. I have not attempted > this in some time. I will review this again eventually. > > If you're trying to get it work, its actually 99% working, with just a > few minor bugs or incompatibilities in the toolchain that prevent it > from working out-of-the-box. With a little bit of time tracking down > the problems in the usual fashion, you should be able to get it to work. Thanks for reply. I'm not expert in converting libs (I only used reimp in standard form). What do You mean as "tracking down the problems in the usual fashion"? When I tried to link it normal I had: g++.exe main.o Game.o Cuboid.o -o "DirectX4.exe" -L"E:/Dev-Cpp/lib" -L"E:/DirectX9/lib" -ld3d9 -ld3dx9 -lwinmm <OUTPUT> Warning: .drectve `%.*s' unrecognized Warning: .drectve `%.*s' unrecognized (...) Warning: .drectve `%.*s' unrecognized Warning: .drectve `%.*s' unrecognized E:/DirectX9/lib/libd3dx9.a(obj/i386/cpudetect.obj)(.text+0xf):..\cpudetect.cpp: undefined reference to `__security_cookie' E:/DirectX9/lib/libd3dx9.a(obj/i386/cpudetect.obj)(.text+0xa0):..\cpudetect.cpp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/cpudetect.obj)(.text+0xa8):..\cpudetect.cpp: undefined reference to `@__security_check_cookie@4' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x13):..\ssefasttable.cp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x1b):..\ssefasttable.cp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x25):..\ssefasttable.cp: undefined reference to `__security_cookie' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x7f):..\ssefasttable.cp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x87):..\ssefasttable.cp: undefined reference to `@__security_check_cookie@4' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x13):..\ssefasttable.cp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x1b):..\ssefasttable.cp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x92):..\ssefasttable.cp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x13):..\ssefasttable.cp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x1b):..\ssefasttable.cp: undefined reference to `_except_list' E:/DirectX9/lib/libd3dx9.a(obj/i386/ssefasttable.obj)(.text+0x80):..\ssefasttable.cp: more undefined references to `_except_list' follow E:/DirectX9/lib/libd3dx9.a(obj/i386/d3dxmathx3d.obj)(.text+0x16):..\d3dxmathx3d.cpp: undefined reference to `__security_cookie' E:/DirectX9/lib/libd3dx9.a(obj/i386/d3dxmathx3d.obj)(.text+0xf0):..\d3dxmathx3d.cpp: undefined reference to `@__security_check_cookie@4' E:/DirectX9/lib/libd3dx9.a(obj/i386/d3dx9dbg.obj)(.text+0x21):..\d3dx9dbg.cpp: undefined reference to `??2@YAPAXI@Z' E:/DirectX9/lib/libd3dx9.a(obj/i386/d3dx9dbg.obj)(.text+0x29):..\d3dx9dbg.cpp: undefined reference to `??2@YAPAXI@Z' E:/DirectX9/lib/libd3dx9.a(obj/i386/d3dx9dbg.obj)(.text+0x46):..\d3dx9dbg.cpp: undefined reference to `??3@YAXPAX@Z' E:/DirectX9/lib/libd3dx9.a(obj/i386/d3dx9dbg.obj)(.text+0x55):..\d3dx9dbg.cpp: undefined reference to `??3@YAXPAX@Z' E:/DirectX9/lib/libd3dx9.a(obj/i386/d3dx9dbg.obj)(.text+0x5d):..\d3dx9dbg.cpp: undefined reference to `??3@YAXPAX@Z' make.exe: *** [DirectX4.exe] Error 1 </OUTPUT> What can I do with this? Regards Marcin "Szpak" Zajączkowski |
From: Aaron W. L. <aar...@aa...> - 2004-11-17 19:48:02
|
Marcin Zaj=B1czkowski wrote: > I'm not expert in converting libs (I only used reimp in standard form).= =20 > What do You mean as "tracking down the problems in the usual fashion"? I mean investigating the particular reason for each link error in the same way you'd debug anything else. (Obviously I can't be more specific.= ) > Warning: .drectve `%.*s' unrecognized The weird .drectve errors come from a bug in binutils that has been fixed. I don't remember whether the fixes just make the errors less weird, or make them go away, but in any case, they're harmless. (The .drectve section contains additional command-line flags in textual form that the compiler would like the linker to use, which binutils does not completely support. In this case, it is the autolink functionality.) E:/DirectX9/lib/libd3dx9.a(obj/i386/cpudetect.obj)(.text+0xa0):..\cpudete= ct.cpp: > undefined reference to `_except_list' The other errors are undefined symbols that the MSVC-generated code in D3DX that expects to be linked against a complete MSVC runtime library. I think most of these can be easily fixed by creating a complete libmsvcrt.a import library. The MinGW one is presently missing a few symbols that MSVC code needs. Note that you will need to use current binutils CVS to do this due to bugs in dlltool. You also probably will need to use mainline binutils anyway because D3DX requires working weak symbol support in the linker, which no release of binutils supports. (Without it, link will suceed, but the generated executable will crash randomly.) I recall from memory that you'll also need to create a few aliases for alloca that MSVC's runtime usually provides. There may be a few other fixes of this nature required. If this sounds a little too tricky for you, you'll have to wait until someone has fixed all of this, and the fixes make their way into a release version of the tools. Aaron W. LaFramboise |
From: <ms...@wp...> - 2004-11-18 23:10:06
|
Dnia 2004-11-17 20:49, Użytkownik Aaron W. LaFramboise napisał: (...) > There may be a few other fixes of this nature required. If this sounds > a little too tricky for you, you'll have to wait until someone has fixed > all of this, and the fixes make their way into a release version of the > tools. A "little too tricky" :( I donwloaded DX SDK Extras and tried with library version for VC 6.0 and I had less errors, but they still exist. Maybe I willl try to create import library, but after Your message I afraid that it's to much for me to make it work in normal way. In meantime I changed search criteria and found DevPak for DirectX 9.0c (unfortunately Summer 2004 :(, but it's better than none) which works with "normal" d3dx9.lib (with d3dx9.dll which "holds all the symbols of the library"). Probably it was done as You descibed, but it's only assumptions. If someone is interested: http://www.g-productions.net/page.php?id=12 (download: http://www.g-productions.net/list.php?c=fl_devpak) Thanks for help Marcin |