|
From: | Roumen Petrov |
Subject: | Re: d3dx9.lib is not managed by ld, but libd3dx9.a is |
Date: | Thu, 04 Jun 2009 21:54:24 +0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090411 SeaMonkey/1.1.16 |
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 blahand 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
[Prev in Thread] | Current Thread | [Next in Thread] |