我已經在/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