使用Visual Studio 10 Express编译openldap [英] Compiling openldap using Visual Studio 10 Express

查看:125
本文介绍了使用Visual Studio 10 Express编译openldap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是使用Visual Studio为Windows编译openldap.我很乐于在POSIX环境中进行configure> make> make install,但是我从未使用过VS,而且不确定如何使用openldap源代码压缩包中的内容生成可用的makefile.

I've been tasked with compiling openldap for Windows, using Visual Studio. I am comfortable doing configure > make > make install in POSIX environments, but I have never used VS and am not sure how to even generate a useable makefile using what's in the openldap source tarball.

我在Windows 7机器上安装了Visual C ++ 10 Express,并且我还安装了MinGW来尝试运行配置脚本,但是我担心这将插入MinGW库,而不是任何本机Windows库. VC会使用.

I have Visual C++ 10 Express installed on a Windows 7 box, and I've also installed MinGW to try to run the configure script, but I'm afraid that's going to then insert MinGW libraries, instead of whatever native Windows libs VC would use.

如果有任何线索,我将不胜感激.

I would be grateful for any clues.

推荐答案

KDE的人员具有针对openldap的基于CMake的构建系统.您可以按照 http://techbase.kde.org/Getting_Started/Build/Windows上的说明进行操作. /emerge 来设置构建环境.主要步骤如下:

The KDE guys have CMake-based build system for openldap. You could follow the instructions on http://techbase.kde.org/Getting_Started/Build/Windows/emerge to set up the build environment. The main steps would be something like:

mkdir c:\kdedev
cd c:\kdedev
git clone git://anongit.kde.org/emerge.git
mkdir etc
cp emerge\kdesettings-example.bat etc\kdesettings.bat
# edit kdesettings.bat to use msvc2010 compiler
emerge\kdeenv.bat
emerge openldap

这不仅会构建openldap(它会引入cyrus-sasl和openssl之类的依赖项).有许多适用于KDE构建的补丁程序,它们在KDE环境外部可能相关,也可能不相关.

This will build more than just openldap (it pulls in dependencies like cyrus-sasl and openssl). There are a number of patches that are applied for the KDE builds, that may or may not be relevant outside of the KDE environment.

但是,令人高兴的是CMake支持生成Visual Studio项目文件,因此您可以生成该文件并在VS中进行构建.

But the nice thing is that CMake supports generating a Visual Studio project file, so you'd be able to generate that and do builds in VS.

这篇关于使用Visual Studio 10 Express编译openldap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆