我正在創建一個需要使用libnoise頭文件的項目。但是我編譯有困難。在Eclipse中設置庫CDT
我已經把標題到我的項目我的src /目錄,所以我可以將它們包括與
#include "noise/noise.h"
#include "noise/noisegen.h"
#include "noiseutils.h"
但是當我嘗試創建一個柏林模塊noise::module::Perlin perlinModule;
,我得到以下編譯錯誤:
PROJECTDIR\bin/../src/libnoise_wrapper.cpp:66: undefined reference to `noise::module::Perlin::Perlin()'
./src/libnoise_wrapper.o: In function `~Perlin':
PROJECTDIR\bin/../src/noise/module/perlin.h:160: undefined reference to `vtable for noise::module::Perlin'
PROJECTDIR\bin/../src/noise/module/perlin.h:160: undefined reference to `noise::module::Module::~Module()'
PROJECTDIR\bin/../src/noise/module/perlin.h:160: undefined reference to `vtable for noise::module::Perlin'
PROJECTDIR\bin/../src/noise/module/perlin.h:160: undefined reference to `noise::module::Module::~Module()
我已經創建了一個項目包括參考/ SRC /噪聲文件夾以及文件noiseutils.h(這是在src /目錄本身)。
有沒有其他配置我缺少?
可能的重複[什麼是未定義的引用/無法解析的外部符號錯誤,以及如何解決它?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-外部符號錯誤和怎麼辦我修復) –
@πάνταῥεῖ:請停止downvoting和關閉投票一切都有表達「無法解析的外部符號」與明顯不好的「規範重複」。這不是建設性的。即使設法關閉,我也會立即重新打開它,並重新進行綁定。 – lpapp