我已经在/opt/hypertable/current/
安装Hypertable的,我逃离Hypertable的一个示例程序...Hypertable的库链接问题
#include <Common/Compat.h>
#include <iostream>
#include <fstream>
#include <string>
#include <Common/System.h>
#include <Common/Error.h>
#include <Hypertable/Lib/Client.h>
#include <Hypertable/Lib/KeySpec.h>
using namespace Hypertable;
int main(int argc, char* argv[]) {
ClientPtr client_ptr;
TablePtr table_ptr;
TableMutatorPtr mutator_ptr;
KeySpec key;
const char* install_dir = "/opt/hypertable/current/";
client_ptr = new Client(System::locate_install_dir(install_dir));
}
我得到这个错误
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/testes.d" -MT"src/testes.d" -o"src/testes.o" "../src/testes.cpp"
../src/testes.cpp:1: fatal error: Common/Compat.h: No such file or directory
我使用的Eclipse CDT我的发展,我链接使用项目Properties->c/c++build->setting->Libraries->LibrarySetPath(-L)
和我已经签署了HyperCommon also in -l
这我把它设置为/opt/hypertable/current/include/
任何一个可以告诉我,我得到这个错误...
我如何在eclipse中添加-I选项 – raagavan 2011-03-21 04:14:14
我不使用Eclipse,抱歉。在C++构建设置中应该有一个名为“包含路径”的地方(类似于你找到“库路径”的地方),这就是你应该把它放在哪里。 – mgiuca 2011-03-22 10:49:58