I attempted to build the python plugin, i.e.
https://github.com/spillz/codeblocks-python
(which looks awesome). However, build fails with the following error:
XmlRpcEvents.cpp -o .objs/XmlRpcEvents.o
rm -f libXmlRpcEmbedder.a
ar -r -s libXmlRpcEmbedder.a .objs/ExecHiddenMSW.o .objs/XMLRPC/src/XmlRpcClient.o .objs/XMLRPC/src/XmlRpcDispatch.o .objs/XMLRPC/src/XmlRpcServer.o .objs/XMLRPC/src/XmlRpcServerConnection.o .objs/XMLRPC/src/XmlRpcServerMethod.o .objs/XMLRPC/src/XmlRpcSocket.o .objs/XMLRPC/src/XmlRpcSource.o .objs/XMLRPC/src/XmlRpcUtil.o .objs/XMLRPC/src/XmlRpcValue.o .objs/xmlrpc_embedder.o .objs/XmlRpcEvents.o
/home/rcrozier/src/codeblocks-python-git/XmlRpcEmbedder/xmlrpc_embedder.cpp: In member function ‘void XmlRpcInstance::OnEndProcess(wxProcessEvent&)’:
/home/rcrozier/src/codeblocks-python-git/XmlRpcEmbedder/xmlrpc_embedder.cpp:463:37: error: ‘virtual void wxEvtHandler::AddPendingEvent(const wxEvent&)’ is inaccessible within this context
m_parent->AddPendingEvent(ce);
^
In file included from /usr/include/wx-3.0/wx/app.h:19:0,
from /home/rcrozier/src/codeblocks-python-git/XmlRpcEmbedder/xmlrpc_embedder.h:4,
from /home/rcrozier/src/codeblocks-python-git/XmlRpcEmbedder/xmlrpc_embedder.cpp:3:
/usr/include/wx-3.0/wx/event.h:3387:18: note: declared here
virtual void AddPendingEvent(const wxEvent& event)
^~~~~~~~~~~~~~~
Process terminated with status 1 (0 minute(s), 2 second(s))
1 error(s), 2 warning(s) (0 minute(s), 2 second(s))
I then googled and found this
https://forums.wxwidgets.org/viewtopic.php?t=22962
However, (some time ago) I tried fixing this and then found other errors, I guess this is generally due to changes in wxWidgets (plugin depends on v2?). In general, does anyone know if anyone is working on this plugin? I left a github issue but the author never responded. I feel like someone experienced with the plugin system, codeblocks and wxWidgets could probably fix this in about 20 minutes.
I made a fork and began making some fixes here:
https://github.com/crobarcro/codeblocks-python
one of the issues with the plugin is the definition of some constants is missing:
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:177:39: error: ‘wxSCI_KEYMOD_CTRL’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_LEFT, wxSCI_KEYMOD_CTRL, wxSCI_CMD_WORDPARTLEFT);
^~~~~~~~~~~~~~~~~
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:179:57: error: ‘wxSCI_KEYMOD_SHIFT’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_LEFT, wxSCI_KEYMOD_CTRL|wxSCI_KEYMOD_SHIFT, wxSCI_CMD_WORDPARTLEFTEXTEND);
^~~~~~~~~~~~~~~~~~
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:184:39: error: ‘wxSCI_KEYMOD_CTRL’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_LEFT, wxSCI_KEYMOD_CTRL, wxSCI_CMD_WORDLEFT);
^~~~~~~~~~~~~~~~~
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:186:57: error: ‘wxSCI_KEYMOD_SHIFT’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_LEFT, wxSCI_KEYMOD_CTRL|wxSCI_KEYMOD_SHIFT, wxSCI_CMD_WORDLEFTEXTEND);
^~~~~~~~~~~~~~~~~~
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:201:38: error: ‘wxSCI_KEYMOD_NORM’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_END, wxSCI_KEYMOD_NORM, wxSCI_CMD_LINEENDWRAP);
^~~~~~~~~~~~~~~~~
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:202:38: error: ‘wxSCI_KEYMOD_ALT’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_END, wxSCI_KEYMOD_ALT, wxSCI_CMD_LINEEND);
^~~~~~~~~~~~~~~~
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:203:38: error: ‘wxSCI_KEYMOD_SHIFT’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_END, wxSCI_KEYMOD_SHIFT, wxSCI_CMD_LINEENDWRAPEXTEND);
^~~~~~~~~~~~~~~~~~
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:224:38: error: ‘wxSCI_KEYMOD_ALT’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_END, wxSCI_KEYMOD_ALT, wxSCI_CMD_LINEENDWRAP);
^~~~~~~~~~~~~~~~
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp:225:38: error: ‘wxSCI_KEYMOD_SHIFT’ was not declared in this scope
CmdKeyAssign(wxSCI_KEY_END, wxSCI_KEYMOD_SHIFT|wxSCI_KEYMOD_ALT, wxSCI_CMD_LINEENDWRAPEXTEND);
^~~~~~~~~~~~~~~~~~
I presume at some point these were defined somewhere in the code provided by codeblocks, but are no longer present. Can anyone tell me if there are appropriate replacements for these?
Ok, I realised I needed to change _KEYMOD_ to _SCMOD_
Now I get the following errors:
-------------- Build: cbplugin in PythonInterpreter (compiler: GNU GCC Compiler)---------------
g++ -Wall -ansi -g -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -fmessage-length=0 -fexceptions -Winvalid-pch -fPIC -DcbDEBUG -DCB_PRECOMP -std=c++11 -g -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I/usr/local/include/codeblocks -I/usr/local/include/codeblocks/tinyxml -I/usr/local/include/codeblocks/scripting/include -I/usr/local/include/codeblocks/scripting/bindings -I/usr/local/include/codeblocks/scripting/sqplus -I/usr/local/include/codeblocks/wxscintilla/include -I../XmlRpcEmbedder -I../XmlRpcEmbedder/XMLRPC/include -c /home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/PythonInterpCtrl.cpp -o .objs/PythonInterpCtrl.o
g++ -shared -L../XmlRpcEmbedder .objs/PythonInterpCtrl.o .objs/PythonInterpreter.o .objs/ShellCtrlBase.o -o PythonInterpreter.so -L/usr/lib/x86_64-linux-gnu -pthread -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -Wl,-z,defs -L/usr/local/lib -lcodeblocks -lXmlRpcEmbedder
.objs/ShellCtrlBase.o: In function `ShellManager::LaunchProcess(wxString const&, wxString const&, wxString const&, wxArrayString const&)':
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/ShellCtrlBase.cpp:161: undefined reference to `wxAuiNotebook::InsertPage(unsigned long, wxWindow*, wxString const&, bool, wxBitmap const&)'
.objs/ShellCtrlBase.o: In function `ShellManager::ShellManager(wxWindow*)':
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/ShellCtrlBase.cpp:261: undefined reference to `wxAuiNotebook::AddPage(wxWindow*, wxString const&, bool, wxBitmap const&)'
.objs/ShellCtrlBase.o: In function `__static_initialization_and_destruction_0(int, int)':
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/ShellCtrlBase.cpp:88: undefined reference to `wxEVT_AUINOTEBOOK_PAGE_CLOSE'
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/ShellCtrlBase.cpp:88: undefined reference to `wxEVT_AUINOTEBOOK_PAGE_CLOSE'
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/ShellCtrlBase.cpp:89: undefined reference to `wxEVT_AUINOTEBOOK_PAGE_CHANGING'
/home/rcrozier/src/codeblocks-python-crobarcro-git/PythonInterpreter/ShellCtrlBase.cpp:89: undefined reference to `wxEVT_AUINOTEBOOK_PAGE_CHANGING'
.objs/ShellCtrlBase.o: In function `wxAuiNotebook::wxAuiNotebook(wxWindow*, int, wxPoint const&, wxSize const&, long)':
/usr/include/wx-3.0/wx/aui/auibook.h:258: undefined reference to `vtable for wxAuiNotebook'
/usr/include/wx-3.0/wx/aui/auibook.h:258: undefined reference to `vtable for wxAuiNotebook'
/usr/include/wx-3.0/wx/aui/auibook.h:258: undefined reference to `wxAuiManager::wxAuiManager(wxWindow*, unsigned int)'
/usr/include/wx-3.0/wx/aui/auibook.h:258: undefined reference to `wxAuiTabContainer::wxAuiTabContainer()'
/usr/include/wx-3.0/wx/aui/auibook.h:259: undefined reference to `wxAuiNotebook::Init()'
/usr/include/wx-3.0/wx/aui/auibook.h:260: undefined reference to `wxAuiNotebook::Create(wxWindow*, int, wxPoint const&, wxSize const&, long)'
/usr/include/wx-3.0/wx/aui/auibook.h:258: undefined reference to `wxAuiTabContainer::~wxAuiTabContainer()'
/usr/include/wx-3.0/wx/aui/auibook.h:258: undefined reference to `wxAuiManager::~wxAuiManager()'
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 2 second(s))
15 error(s), 0 warning(s) (0 minute(s), 2 second(s))
It seems like the correct library is not being linked, all errors are related to wxAUI. Can anyone tell me what I need to link to to get rid of these undefined reference errors?