Visual Studio配置VLFeat库

These instructions show how to setup a basic VLFeat project with Visual C++ Express 2008 on Windows XP (32 bit). Instructions for other versions of Visual Studio should be similar.

First, we create a new project called vlfeat-client. Open Visual C++ Express 2008 and select File > New > Project and choose General > Empty Project. Give your project a name and location (here vlfeat-client) and click OK.

New Project  
Empty Project

Next, we have to modify the project properties to include the VLFeat library and include directories. Right click on the project and select properties.

Properties

We want these settings to apply to both Debug and Release builds, so switch to all configurations.

All Configurations

Add an additional include path which points to the root of the VLFeat folder:

Additional Includes

Add an additional library include path pointing to the bin/w32 folder in the distribution, and add vl.dll as a dependency:

Additional LIBDIR Additional Dependencies

This will allow us to compile, but we will not be able to run, getting because vl.dll will not be found:

vl.dll was not found

To remedy this, we add a post-build step which copies vl.dll to the debug or release folder. Since this only needs to be done once for each project, we could instead copy the file manually.

Post-build step

Now that we have created our project, add a new .cpp file (right click on Source Files and choose Add > New Item) with this code:

extern "C" {
#include <vl/generic.h>
}

int main (int argc, const char * argv[]) {
  VL_PRINT ("Hello world!\n") ;
  return 0;
}

Build and run the project (Ctrl+F5). It should run correctly, and you should see this:

Visual C++ OK


from: http://www.vlfeat.org/vsexpress.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在Visual Studio配置Boost,您可以按照以下步骤进行操作: 1. 首先,下载并安装Boost。您可以从Boost官方网站(https://www.boost.org/)下载最新版本的Boost。 2. 解压下载的Boost文件,并将其放置在您选择的目录中。 3. 打开Visual Studio,并创建一个新的项目或打开现有项目。 4. 在Visual Studio中,选择“项目”菜单,然后选择“属性”选项。 5. 在属性窗口中,选择“VC++目录”选项,并点击“包含目录”字段旁边的下拉箭头。 6. 单击下拉箭头后,选择“编辑”选项。 7. 在“包含目录”对话框中,点击右上角的“新建文件夹”图标并添加Boost的头文件目录。这是您解压缩的Boost文件夹中的子文件夹“boost”的路径。 8. 点击“确定”关闭对话框。 9. 在属性窗口中,选择“VC++目录”选项,并点击“目录”字段旁边的下拉箭头。 10. 单击下拉箭头后,选择“编辑”选项。 11. 在“目录”对话框中,点击右上角的“新建文件夹”图标并添加Boost文件目录。这是您解压缩的Boost文件夹中名为“lib”的子文件夹的路径。 12. 点击“确定”关闭对话框。 13. 在属性窗口中,选择“链接器”选项,并点击“输入”字段。 14. 在“附加依赖项”字段中,添加Boost的名称。例如,如果您使用的是Boost的系统名称,则可以添加“boost_system.lib”和“boost_filesystem.lib”。 15. 点击“应用”按钮,然后点击“确定”按钮。 经过以上步骤,您的Visual Studio项目应该已经成功配置了Boost

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值