[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: MinGW and Client Libraries





Douglas Abbink wrote:
 Hello,

 I have done repeated searches through the archives and have not been
 able to find the answer I need.

 I am working on porting a Linux App to WIN32.  The Linux project is
 currently using OpenLDAP 2.2.17 for client access.  What I need is to
 get the client libraries libldap and liblber into either static or
 dynamic libraries I can link to using MSVC 2003 (7.1).

 I have been able to compile the whole openLDAP server using MinGW,
 MSYS and a version of Lucas Bergman's script (all other attempts,
 like what is described in the FAQ, fail at one point or another). But
 I have no idea how to get the client libraries in a form MSVC can
 use.

You probably need to use something newer than 2.2.17; there have been a few tweaks to the Makefiles since then to get the MSYS Win32 builds going more smoothly.


Using MinGW/MSYS you will not be able to produce MSVC-compatible static libraries. However for shared libraries, the DLLs will be compatible. You will still need to create MSVC-compatible import libraries for the DLLs, see this Microsoft article for directions: http://support.microsoft.com/kb/q131313/

 What I would like to know is:

...

I have seen similar questions (about getting windows builds) asked in the archives, but don't find many answers. Is it just that I cannot find the answers in the archives, or has no one found a good way to compile the 2.2.x system on Windows?

I think the point is more that we have no interest in using our resources to support a closed-source proprietary tool chain (MSVC) on an Open Source project, especially when Microsoft already has ample resources available for the purpose. (And indeed, MS provides knowledgebase articles like the one referenced above which provides the solution. No need for us to re-invent the wheel.)


 Are there special flags to produce static or dynamic libraries, Or,
 can the .a files produced by MinGW be converted to .lib files that
 MSVC understands, or, is there some other way to get a hold of these
 libraries?

Also more to the point, your question is really specific to how to use your build tools, not how to use OpenLDAP software. You're expected to already know how to use your build system, whatever platform it may be, and there are obviously plenty of forums devoted to Microsoft and MinGW build tools. This type of question doesn't really belong here.


--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support