LNK1104:无法打开文件libboost_date_time-VC [英] LNK1104 :cannot open file libboost_date_time-vc

查看:2141
本文介绍了LNK1104:无法打开文件libboost_date_time-VC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我米工作在客户SEVER程序,我使用CROW microframework创建服务器站点。这样做的原因是因为CROW是用C加上加上语言,也是我为熟悉C加再加,接下来,这CROW microframework需要BOOST这个库来执行,所以,我跟了这,我所做的一切必须是做是为了确保我的程序可以使用Boost库执行。我已经写在记事本我的code ++。在这里我的codeS:

Currently I m working on client-sever program, I uses CROW microframework to create server site. The reason of this is because CROW was written in C plus plus language and also I m familiar with c plus plus, Next, this CROW microframework require BOOST this library to execute, So, I have followed this , I have done what need to be done to make sure my program can execute with the boost libraries. I have written my code in notepad++ . here my codes :

#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501

#include "crow.h"

using namespace std;


int main()
{
    cout << "hello world";

   return 0;
}


#endif

此外,我会使用此VS2015提供的编译我的程序开发人员命令提示符。像这样

我已经花了几个小时,以谷歌,为什么我会得到这个错误,最终没有从谷歌的资源的工作。从这里有人告诉该如何解决的错误?您的帮助将是AP preciated!

I have spent hours to google why am I getting that error, eventually none of the resource from google is working. Someone from here please tell what is the solution to the error? Your help will be appreciated!

image_

推荐答案

好吧,这看起来像一个链接的问题,这意味着你的CROW库未正确关联提振。那么,如何做到这一点,并确保它的作品,这里是一个指导(对于msvc2013用户)

Well, this looks like a linking problem, meaning that your CROW library is not linked properly to Boost. So, how to do that and make sure it works, here is a guide (for msvc2013 users).

要求:


  • 安装升压(无需手动安装为precompiled 二进制存在,我根据你的工具集(msvc2013)和建筑学(32/64位)不知道,使用<一个建议1.60.0,选一href=\"https://sourceforge.net/projects/boost/files/boost-binaries/1.60.0/boost_1_60_0-msvc-12.0-64.exe/download\"相对=nofollow>这个)

  • 从github上下载 CROW 源$ C ​​$ C。

  • 下载并安装 CMake的(版本> 2.8)

  • Install boost (No need to install it manually as precompiled binaries exist, I recommend 1.60.0, choose one according to your toolset (msvc2013) and architecture (32/64 bits). Not sure, use this )
  • Download CROW source code from github.
  • Download and install CMake (version > 2.8)

安装步骤:


  • 文件夹,我们将其称之为 Crow_folder
  • 在提取CROW_source
  • 创建您的Crow_folder`内/ build文件夹。

  • 开启的CMake和设置源文件夹作为Crow_folder和build文件夹到Crow_folder /编译(您刚才创建的)。

  • Extract CROW_source in a folder we will call it Crow_folder.
  • create a /build folder inside your Crow_folder`.
  • Open CMake and set the source folder as your Crow_folder and the build folder to the Crow_folder/build (that you have just created).

下面是截图:

链接加速至乌鸦:

现在,点击设置,并选择架构:

Now, hit configure, and choose the architecture :

下面,只需使用相同的架构作为推动作用。

Here, just use the same architecture as your boost.


  • 的Visual Studio 2013 12 Win64中 - >提升64位

  • 的Visual Studio 2013 12 - >提振32位

下面是对话的截图:

在这里输入的形象描述

点击添加条目,一个对话框会被提出来,并添加以下条目:

Click on Add Entry , a dialog will be brought up and add the following entries :


  • NAME:BOOST_ROOT |类型:路径| VALUE:Boost_Install_Dir(某物,如C:/本地/ Boost_1_60)

  • NAME:BOOST_LIBRARYDIR |类型:路径| VALUE:Boost_Install_Dir / lib64_msvc-12.0(某物如C:/Local/Boost_1_60/lib64_msvc-12.0 /)

在这里输入的形象描述

生成:

现在,按配置。如果一切正常,就一定会成功!
现在你的项目配置,按生成

Now, hit configure. If everything is OK, it will be successful ! Now that your project is configured, hit Generate.

测试:

在你的 Crow_folder /编译,一个 MSVC工程将创建和包含的乌鸦例如。打开该项目,并构建它。并希望,这将是成功的。

In your Crow_folder/build , an msvc project will be created and containing the Crow example. Open that project and build it. and hopefully, it will be successful.

恭喜,现在,你可以使用CROW。

Congratulations, now, you can use CROW.

在这里输入的形象描述

PS: 这个工作msvc2013,不msvc2015 。 (它看起来像它不会反正现在由于拉姆达问题,<一个工作,为href=\"https://connect.microsoft.com/VisualStudio/feedback/details/2582608/c-14-internal-compiler-error-when-mixing-generic-lambdas-and-template-member-functions\"相对=nofollow>这里和<一个href=\"https://connect.microsoft.com/VisualStudio/feedback/details/1396868/msvc-2015-crashes-when-faced-with-lambda-ex$p$pssion-in-function-parameter-array-bounds\"相对=nofollow>这里)

PS: this worked for msvc2013, not msvc2015. (It looks like it won't work with it anyway, for now due to lambda problems as here and here)

这篇关于LNK1104:无法打开文件libboost_date_time-VC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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