我尝试在Code::Block IDE中使用Nana库。我做了像这里这样的所有设置
并添加-std=C++11标志和Boost包含路径,但是它在构建时打印下一个错误:
nana/include/nana/paint/graphics.hpp|143|error:‘unsigned int nana::paint::graphics::bidi_string(const nana::point&,const char*,std::size_t)’不能与‘unsigned int nana::paint::graphics::bidi_string(const nana::point&,const char_t*,std::size_t)’
我只开始学习C++ 11标准库和Nana GUI库,无法理解这些bug。
发布于 2015-11-07 12:29:52
我也面临着同样的问题。为了解决问题,我看看nana如何通过用make VERBOSE=1编译nana来自行处理这个问题,并从中获得定义。
因此,要编译示例:
#include<nana/gui.hpp>
int main()
{
using namespace nana;
form fm;
drawing{fm}.draw([](paint::graphics& graph){
graph.string({10, 10}, L"Hello, world!", colors::red);
});
fm.events().click(API::exit);
fm.show();
exec();
}在nana站点(http://nanapro.org/en-us/)中,我使用以下命令行:
g++ -DNANA_ENABLE_PNG -DNANA_LIBPNG -DNANA_LINUX -DNANA_UNICODE \
-DNANA_X11 -DPLATFORM_SPEC_HPP="<nana/detail/linux_X11/platform_spec.hpp>" \
-DSTD_CODECVT_NOT_SUPPORTED -std=c++11 -I nana/include/ \
test.cpp build/libnana.a -lX11 -lXft -lpthread -lpnghttps://stackoverflow.com/questions/33543674
复制相似问题