Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux compilation #8

Open
oafilipoai opened this issue Sep 28, 2017 · 4 comments
Open

Linux compilation #8

oafilipoai opened this issue Sep 28, 2017 · 4 comments

Comments

@oafilipoai
Copy link

Hello,

I'm having some issues compiling in Linux. I'm using Debian Stretch and I get the error bellow when I try to compile. In cmake-gui I unchecked USE_CX3D since that library also has compilation errors.
I also tried to run KiCad-Librarian with wine and that somewhat works, although some menus and selection boxes are misplaced or squashed and the 3D viewer does not work.

Any help is appreciated

/home/tavi/src/KiCad-Librarian/src/pdfreport.cpp:804:51: error: no matching function for call to ‘wxSortedArrayString::wxSortedArrayString(int (&)(const wxString&, const wxString&))’
wxSortedArrayString SortedIndex(CompareFootprint);
^
In file included from /usr/include/wx-3.0/wx/filefn.h:15:0,
from /usr/include/wx-3.0/wx/utils.h:20,
from /usr/include/wx-3.0/wx/cursor.h:69,
from /usr/include/wx-3.0/wx/event.h:21,
from /usr/include/wx-3.0/wx/window.h:18,
from /usr/include/wx-3.0/wx/nonownedwnd.h:14,
from /usr/include/wx-3.0/wx/toplevel.h:20,
from /usr/include/wx-3.0/wx/frame.h:18,
from /home/tavi/src/KiCad-Librarian/src/pdfreport.h:25,
from /home/tavi/src/KiCad-Librarian/src/pdfreport.cpp:26:

@FabianInostroza
Copy link

Change the file pdfreport.cpp, line 804 to this:

  wxSortedArrayString SortedIndex;
  for (wxStringToStringHashMap::iterator iter = FootprintIndex.begin(); iter != FootprintIndex.end(); iter++) {
    wxString line = iter->first + wxT(" : ") + iter->second;
    SortedIndex.Add(line);
  }
  SortedIndex.Sort(CompareFootprint);
  FootprintIndex.clear();

@ghost
Copy link

ghost commented Oct 21, 2018

This does not cure the problem. It just changes the error slightly:

~/Software/KiCad-Librarian/src/pdfreport.cpp: In member function ‘bool PdfReport::FootprintReport(wxWindow*, const wxString&, const wxArrayString&, const wxString&)’:
~/Software/KiCad-Librarian/src/pdfreport.cpp:809:36: error: no matching function for call to ‘wxSortedArrayString::Sort(int (&)(const wxString&, const wxString&))’
   SortedIndex.Sort(CompareFootprint);
                                    ^
In file included from /usr/include/wx-3.0/wx/filefn.h:15:0,
                 from /usr/include/wx-3.0/wx/utils.h:20,
                 from /usr/include/wx-3.0/wx/cursor.h:69,
                 from /usr/include/wx-3.0/wx/event.h:21,
                 from /usr/include/wx-3.0/wx/window.h:18,
                 from /usr/include/wx-3.0/wx/nonownedwnd.h:14,
                 from /usr/include/wx-3.0/wx/toplevel.h:20,
                 from /usr/include/wx-3.0/wx/frame.h:18,
                 from /home/adjco/Downloads/Software/KiCad-Librarian/src/pdfreport.h:25,
                 from /home/adjco/Downloads/Software/KiCad-Librarian/src/pdfreport.cpp:26:
/usr/include/wx-3.0/wx/arrstr.h:96:10: note: candidate: void wxSortedArrayString::Sort()
     void Sort()
          ^~~~
/usr/include/wx-3.0/wx/arrstr.h:96:10: note:   candidate expects 0 arguments, 1 provided
make[2]: *** [CMakeFiles/kicadlibrarian.dir/build.make:327: CMakeFiles/kicadlibrarian.dir/pdfreport.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/kicadlibrarian.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

@FabianInostroza
Copy link

@adjco Seems to depend on how the wxWidgets library was configured. It compiles fine on my system.

Try changing the type of SortedIndex (wxSortedArrayString) to wxArrayString, with that change it still compiles and work fine on my system (debian testing).

@ghost
Copy link

ghost commented Oct 21, 2018

That did the trick. Thank you Fabian, you're a star.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants