连接错误,同时建立在Visual Studio C ++ 2008例preSS使用Boost ASIO软件 [英] Linker Error while building application using Boost Asio in Visual Studio C++ 2008 Express

查看:178
本文介绍了连接错误,同时建立在Visual Studio C ++ 2008例preSS使用Boost ASIO软件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始写在C ++中使用Visual Studio C ++ 2008例preSS的小应用程序。我安装使用Windows Installer Boost库。在编译程序我得到以下错误:

I just started writing a small application in C++ using Visual Studio C++ 2008 Express. I installed the Boost Library using the windows installer. While compiling the program i get the following error :

编译...
stdafx.cpp
编译...
websave.cpp
GoogleAuthenticate.cpp
生成code ...
清单编制资源...
微软(R)的Windows(R)资源编译器版本6.1.6723.1
版权所有(C)微软公司。版权所有。
链接...
LINK:致命错误LNK1104:无法打开文件'libboost_system-vc90-MT-GD-1_38.lib

Compiling... stdafx.cpp Compiling... websave.cpp GoogleAuthenticate.cpp Generating Code... Compiling manifest to resources... Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1 Copyright (C) Microsoft Corporation. All rights reserved. Linking... LINK : fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_38.lib'

// GoogleAuthenticate.h

// GoogleAuthenticate.h

#pragma once
#include <boost/asio.hpp>

class GoogleAuthenticate
{
  public:
        GoogleAuthenticate(void);
        virtual ~GoogleAuthenticate(void);
};

// GoogleAuthenticate.cpp

// GoogleAuthenticate.cpp

#include "StdAfx.h"
#include "GoogleAuthenticate.h"


GoogleAuthenticate::GoogleAuthenticate(void)
{
}

GoogleAuthenticate::~GoogleAuthenticate(void)
{
}

// websave.cpp

// websave.cpp

#include "stdafx.h"
#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{ 
    cout << "hello" << endl; 
return 0;
}

我查了升压/升压1.38 / lib文件夹和libboost_system-vc90-MT-GD-1_38.lib是present那里。还追加了在附加包含目录的项目配置属性的路径。

I checked the boost/boost-1.38/lib folder and the libboost_system-vc90-mt-gd-1_38.lib is present there. Also added the path in "Additional Include Directories" in Configuration Properties of the project.

有没有正在这里错过什么?

Is there anything that is being missed here ?

推荐答案

忘了补充一点:
在配置属性>链接>附加库目录,输入路径升压二进制文件,例如C:\\ Program Files文件\\提升\\ boost_1_38_0 \\ lib中

Forgot to add this : In Configuration Properties > Linker > Additional Library Directories, enter the path to the Boost binaries, e.g. C:\Program Files\boost\boost_1_38_0\lib.

应该有RTFM。 <一href=\"http://www.boost.org/doc/libs/1_36_0/more/getting_started/windows.html#link-from-within-the-visual-studio-ide\" rel=\"nofollow\">http://www.boost.org/doc/libs/1_36_0/more/getting_started/windows.html#link-from-within-the-visual-studio-ide

固定。

这篇关于连接错误,同时建立在Visual Studio C ++ 2008例preSS使用Boost ASIO软件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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