|
From: Mario B. <st...@vi...> - 2004-02-27 06:08:35
|
Hi Don and all, Once again, I had forgotten to check if I replied to the list or not... could somebody add the "Reply-to: Dev...@li..." field in the headers please? :) On Thu, 26 Feb 2004 11:50:53 -0700, Don Raikes <dnr...@ho...> wrote: >I need to statically link my application to a comercially provided .dll file. > I have the .h and .lib files associated with the dll file. > >How do I tell dev-cpp to link to the dll? I just learned recently (yeah, I'm new at this too :) ) that we can link directly with a dll. According to the ld docs: "The cygwin/mingw ports of ld support the direct linking, including data symbols, to a dll without the usage of any import libraries" "... All that is needed from the developer's perspective is an understanding of this search, in order to force ld to select the dll instead of an import library. For instance, when ld is called with the argument -lxxx it will attempt to find, in the first directory of its search path, libxxx.dll.a xxx.dll.a libxxx.a cygxxx.dll (*) libxxx.dll xxx.dll" So all that you have to do in Dev-cpp is to add the -lxxx in Project options/Parameters/Linker. I tried it and it does work. Hope this helps. -- Mario B. My Landsat images: http://pages.infinit.net/starged/landsat/home.html |