Issues getting PanelDue to compile



  • I'm experiencing issues trying to get PanelDue to compile. Normally, I'd just deal with these errors by, well, fixing them. However, my assumption is that this compiles cleanly for David so I'm guessing that I set something up incorrectly (or that my lack of experience with Eclipse is causing me a problem.)

    Following the instructions here: https://github.com/dc42/PanelDueFirmware/blob/master/BuildInstructions.md

    I installed the cross compiler to it's default directory of "C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update"

    I downloaded the 32bit version of "Eclipse IDE for C/C++ Developers" and copied the archives "eclipse" folder to c:\eclipse. (It's "Eclipse Oxygen.2 (4.7.2))

    I downloaded arduino 1.5.8 and copied make.exe (and two required DLL's) from the archive into the c:\eclipse directory

    I set the workspace, exited eclipse, restarted eclipse and imported the PanelDue project.

    I set the projects C/C++Build->Settings->CrossSettings to "C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update"

    At this point, I right-clicked the PanelDue project, selected "Build Configurations", "Set Active", and then "Release-v3-5.0".

    Again, I right click the PanelDue project and this time select "Build Project."

    That gives a lot of (expected) output, some warnings, etc. However, it also generates some build errors:

    To start:

    [[language]]
    In file included from ../Tools/bmp2c/error_msg.cpp:23:0:
    ../Tools/bmp2c/error_msg.h:49:1: error: extra qualification 'error_msg::' on member 'error_msg' [-fpermissive]
     error_msg::error_msg(int err_code, std::string err_text);
     ^~~~~~~~~
    ../Tools/bmp2c/error_msg.h:50:1: error: extra qualification 'error_msg::' on member 'error_msg' [-fpermissive]
     error_msg::error_msg(std::string err_text);
     ^~~~~~~~~
    ../Tools/bmp2c/error_msg.h:51:1: error: extra qualification 'error_msg::' on member 'error_msg' [-fpermissive]
     error_msg::~error_msg();
     ^~~~~~~~~
    ../Tools/bmp2c/error_msg.h:52:5: error: extra qualification 'error_msg::' on member 'get_err_code' [-fpermissive]
     int error_msg::get_err_code();
         ^~~~~~~~~
    ../Tools/bmp2c/error_msg.h:53:13: error: extra qualification 'error_msg::' on member 'get_err_text' [-fpermissive]
     std::string error_msg::get_err_text();
                 ^~~~~~~~~
    ../Tools/bmp2c/error_msg.h:54:6: error: extra qualification 'error_msg::' on member 'set_err_code' [-fpermissive]
     void error_msg::set_err_code(int err_code);
          ^~~~~~~~~
    ../Tools/bmp2c/error_msg.h:55:5: error: extra qualification 'error_msg::' on member 'add_to_err_text' [-fpermissive]
     int error_msg::add_to_err_text(std::string err_text);
         ^~~~~~~~~
    In file included from ../Tools/bmp2c/bmp2c.cpp:45:0:
    ../Tools/bmp2c/win32ext.h:29:21: fatal error: windows.h: No such file or directory
     #include "windows.h"
    
    

    [[language]]
    ../Tools/bmp2c/archive.cpp: In function 'archive& operator<<(archive&, const char*)':
    ../Tools/bmp2c/archive.cpp:88:26: error: 'strlen' was not declared in this scope
    s.write(str,strlen(str)+1);

    Any suggestions?
    
    Thanks
    Gary

  • administrators

    Either delete the bmp2c folder from your Eclipse project, or exclude it from the project. It is not part of the firmware, it is a tool used to generate the splash screen binary.



  • The issues are easy to resolve: exclude tools, get rid of the extra error_msg:: qualifiers, and include string.h… (at which point it compiles fine.)

    My question is more of a query as to what I might have done wrong getting started that I have to resolve the problems to begin with.


  • administrators

    I didn't update the buildinstructions.md file after I added the Tools folder to the github project. I have done so now.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.