【发布时间】:2009-04-01 06:23:43
【问题描述】:
我刚开始使用 Visual Studio C++ 2008 Express 用 C++ 编写一个小型应用程序。我使用 Windows 安装程序安装了 Boost Library。编译程序时出现以下错误:
正在编译...
stdafx.cpp
正在编译...
websave.cpp
GoogleAuthenticate.cpp
生成代码...
将清单编译为资源...
Microsoft (R) Windows (R) 资源编译器版本 6.1.6723.1
版权所有 (C) 微软公司。保留所有权利。
正在链接...
链接:致命错误 LNK1104:无法打开文件“libboost_system-vc90-mt-gd-1_38.lib”
// GoogleAuthenticate.h
#pragma once
#include <boost/asio.hpp>
class GoogleAuthenticate
{
public:
GoogleAuthenticate(void);
virtual ~GoogleAuthenticate(void);
};
// GoogleAuthenticate.cpp
#include "StdAfx.h"
#include "GoogleAuthenticate.h"
GoogleAuthenticate::GoogleAuthenticate(void)
{
}
GoogleAuthenticate::~GoogleAuthenticate(void)
{
}
// websave.cpp
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cout << "hello" << endl;
return 0;
}
我检查了 boost/boost-1.38/lib 文件夹,并且 libboost_system-vc90-mt-gd-1_38.lib 在那里。还在项目的配置属性中的“其他包含目录”中添加了路径。
这里有什么遗漏的吗?
【问题讨论】:
标签: c++ visual-studio boost linker