Re: d3dx9.lib is not managed by ld, but libd3dx9.a is
Den 2009-06-07 08:52 skrev Ralf Wildenhues: * Roumen Petrov wrote on Thu, Jun 04, 2009 at 08:54:24PM CEST: GNU compiler(mingw) use suffix '.a' for static library and '.dll.a' for import libraries. If a xx.lib file is found in search path libtool has to process file and to find its type(static/import). This impact performance. Well, yes. The expensive part should only happen when we already have a candidate library, however, so it should not happen too often. And correctness trumps performance. Is this perchance fixed already in the pr-msvc-support branch? Yes. The branch will look for import libs named as Microsoft names them. It will also generate import libs with a .lib extension. Cheers, Peter ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: d3dx9.lib is not managed by ld, but libd3dx9.a is
Vincent Torri wrote: Hey, I'm writing a dll using D3D and autotools stuff (MSYS / MinGW). I pass -ld3dx9 and i have added everything so that the dll is built. If I add from the DirectX SDK d3dx9.lib in /mingw/lib, i have the usual warning message from linker / libtool: *** Warning: linker path does not have real file for library -ld3dx9. blah blah blah and only the static lib is built. If I rename d3dx9.lib to libd3dx9.a, then the DLL is built. I don't understand why because, according to the doc of ld for win32: http://sourceware.org/binutils/docs/ld/WIN32.html if I pass -ld3dx9, then d3dx9.lib should be used. What is the reason of the failure ? thank you Vincent Torri I'm not sure that libtool has to deal with library '.lib' suffix. From the suffix is not clear type of library file - static or import library. GNU compiler(mingw) use suffix '.a' for static library and '.dll.a' for import libraries. If a xx.lib file is found in search path libtool has to process file and to find its type(static/import). This impact performance. Also support for MSVC import libraries isn't perfect and linker will fail to link if a library export variables. Note in this case GNU linker succeed to link directly shared(DLL) library. Roumen ___ http://lists.gnu.org/mailman/listinfo/libtool