2016-11-16 5 views
0

limemicroからlms6suiteをコンパイルするとき、私はちょうど私がコンパイルしようとしたhttps://github.com/limemicro/lms6suite からライムマイクロからlms6002のための制御ソフトウェアをダウンロードしたが、私はここで問題になっているヘッダファイルのエラー列挙エラー

[ 1%] Building CXX object CMakeFiles/lms-suite.dir/gui_src/lms_suiteMain.cpp.o In file included from /usr/include/GL/glx.h:30:0, 
       from /usr/local/include/wx-3.0/wx/unix/glx11.h:13, 
       from /usr/local/include/wx-3.0/wx/gtk/glcanvas.h:14, 
       from /usr/local/include/wx-3.0/wx/glcanvas.h:192, 
       from /home/gabriel/ELSE/lms6suite/gui_src/fft/oglGraph/OpenGLGraph.h:15, 
       from /home/gabriel/ELSE/lms6suite/gui_src/fft/pnlFFTviewer.h:17, 
       from /home/gabriel/ELSE/lms6suite/gui_src/lms_suiteMain.cpp:32: /home/gabriel/ELSE/lms6suite/gui_src/pnlLMS6002USB.h:39:14: 
      error: expected identifier before ‘int’ 
     enum Status { SUCCESS, FAILURE }; 
      ^In file included from /home/gabriel/ELSE/lms6suite/gui_src/lms_suiteMain.cpp:44:0: /home/gabriel/ELSE/lms6suite/gui_src/pnlLMS6002USB.h:39:21: 
      error: expected unqualified-id before ‘{’ token 
     enum Status { SUCCESS, FAILURE }; 
        ^CMakeFiles/lms-suite.dir/build.make:1142: recipe for target 'CMakeFiles/lms-suite.dir/gui_src/lms_suiteMain.cpp.o' failed make[2]: 
*** [CMakeFiles/lms-suite.dir/gui_src/lms_suiteMain.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/lms-suite.dir/all' failed make[1]: *** [CMakeFiles/lms-suite.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 

を得た:

を再現する
1 #ifndef PNLLMS6002USBSTICK_H 
    2 #define PNLLMS6002USBSTICK_H 
    3 
    4 #include <wx/panel.h> 
    5 class wxStaticText; 
    6 class wxFlexGridSizer; 
    7 class wxButton; 
    8 
    9 #include "PluginPanel.h" 
10 class ConnectionManager; 
11 
12 class pnlLMS6002USB: public wxPanel, public PluginPanel 
13 { 
14   public: 
15   pnlLMS6002USB(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int st yle = 0, wxString name = ""); 
16     void Initialize(ConnectionManager *pControl); 
17   virtual ~pnlLMS6002USB(); 
18   virtual void UpdatePanel(); 
19 
20     wxButton* btnUpdateAll; 
21   wxComboBox* cmbVCXOcontrolVoltage; 
22 
23   wxPanel* mPanelStreamPLL; 
24   wxTextCtrl* txtPllFreqRxMHz; 
25   wxStaticText* lblRealFreqTx; 
26   wxStaticText* lblRealFreqRx; 
27   wxTextCtrl* txtPllFreqTxMHz; 
28   wxTextCtrl* txtPhaseOffsetDeg; 
29   wxButton* btnConfigurePLL; 
30 
31     static const long ID_BUTTON_UPDATEALL; 
32   static const long ID_VCXOCV; 
33 
34     void OnbtnUpdateAll(wxCommandEvent& event); 
35   void ParameterChangeHandler(wxCommandEvent& event); 
36  protected: 
37   void OnConfigurePLL(wxCommandEvent &event); 
38 
39   enum Status { SUCCESS, FAILURE }; 
40 
41   Status ConfigurePLL(ConnectionManager *serPort, const float fOutTx_MHz, const float fOutRx_MHz, const float phaseShift_deg); 
42 
43   protected: 
44   ConnectionManager *m_serPort; 
45     void BuildContent(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size); 
46 
47     DECLARE_EVENT_TABLE() 
48 }; 
49 
50 #endif 

ステップ:

git clone https://github.com/limemicro/lms6suite lms6suite 
cd lms6suite 
cd build 
cmake ../ 
make 

どこから来るのか教えてもらえますか?

TKSたくさん:)

答えて

0

問題はほぼ確実に列挙型の名前と言葉「ステータス」の使用によるものです。

#define Status int 

だから、前処理した後、定義は次のとおりです:

enum int { SUCCESS, FAILURE }; 

で明らかに上記のプログラムの中に間接的に含まれているXlib.hは、次の行が含まれているため、この名前は、コンパイラエラーが発生します有効でないC++。その列挙型の名前を変更してください。