在Ubuntu 16.04上配置wxFreeChart问题

在Ubuntu 16.04上配置wxFreeChart问题

我有配置问题

petat@UNUC:~/Plocha/wxFreeChart-master$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for the --enable-debug option... will be automatically detected
checking for the --enable-unicode option... will be automatically detected
checking for the --enable-shared option... will be automatically detected
checking for the --with-toolkit option... will be automatically detected
checking for the --with-wxshared option... will be automatically detected
checking for the --with-wxversion option... will be automatically detected
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 3.1.1)
checking for wxWidgets static library... no
checking if wxWidgets was built with UNICODE enabled... yes
checking if wxWidgets was built in DEBUG mode... no
checking if wxWidgets was built in STATIC mode... no
checking which wxWidgets toolkit was selected... configure: error: 
        Cannot detect the currently installed wxWidgets port !
        Please check your 'wx-config --cxxflags'...

如果我在命令行上编译下面的代码,一切正常

#include <wx/wx.h>

class Simple : public wxFrame
{
public:
    Simple(const wxString& title)
        : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(250, 150))
    {
        Centre();
    }
};

class MyApp : public wxApp
{
public:
    bool OnInit()
    {
        Simple *simple = new Simple(wxT("Simple"));
        simple->Show(true);
        return true;
    }
};

wxIMPLEMENT_APP(MyApp);

g++ basic.cpp `wx-config --cxxflags --libs std,aui ` -std=gnu++11 -o program
                  

答案1

您应该安装所有必要的构建工具

sudo apt-get install libwxgtk3.0-dev libwxbase3.0-dev build-essential

然后重试。

相关内容