Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

New plugin: CodePaste

(1/2) > >>

ptDev:
I made a simple plugin that adds the "Paste online" option to the edit menu. It allows to paste code online on pastebin.com, which is useful for people who exchange source code snippets frequently. I recently added a number of features that should make it useful. The source code (Windows only so far) is attached to this post. Extract the files to (your C::B source directory)\plugins\contrib\CodePaste before building.

UPDATE: Can now be checked out from http://codepaste-plugin-codeblocks.googlecode.com/svn/trunk/.

A screenshot (attached) shows the configurable settings.

[attachment deleted by admin]

tibsi:
thanx could you post the *.cbplugin file too?

ptDev:
My configuration is not binary compatible with the configuration used by the C::B Team, hence my .cbplugin file will not even run with a nightly build... For this reason, I'm sorry I don't provide this file. If you can compile it, however, it's possible to export a .cbplugin archive from the plugins manager dialog.

tibsi:
well i guessed so

than can you help me compile this i always get some errors


--- Quote ---C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp||In member function 'virtual void CodePaste::BuildMenu(wxMenuBar*)':|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp|72|warning: 'wxString wxMenuItemBase::GetLabel() const' is deprecated (declared at C:\wxWidgets-2.9.1\include/wx/menuitem.h:177)|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp||In member function 'virtual void CodePaste::BuildModuleMenu(ModuleType, wxMenu*, const FileTreeData*)':|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp|96|warning: 'wxString wxMenuItemBase::GetLabel() const' is deprecated (declared at C:\wxWidgets-2.9.1\include/wx/menuitem.h:177)|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp|87|warning: enumeration value 'mtProjectManager' not handled in switch|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp|87|warning: enumeration value 'mtLogManager' not handled in switch|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp|87|warning: enumeration value 'mtOpenFilesList' not handled in switch|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp|87|warning: enumeration value 'mtUnknown' not handled in switch|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp||In member function 'void CodePaste::OnPasteBin(wxCommandEvent&)':|
C:\Users\Tibsi_\Desktop\CodePaste\CodePaste.cpp|180|warning: comparison between signed and unsigned integer expressions|
.objs\CodePasteConfig.o||In function `ZNK14wxCheckBoxBase9IsCheckedEv':|
C:\wxWidgets-2.9.1\include\wx\checkbox.h|69|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\checkbox.h|70|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
C:\wxWidgets-2.9.1\include\wx\checkbox.h|69|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\checkbox.h|70|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
C:\wxWidgets-2.9.1\include\wx\checkbox.h|69|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\checkbox.h|70|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
C:\wxWidgets-2.9.1\include\wx\checkbox.h|69|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\checkbox.h|70|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
.objs\CodePasteConfig.o:C:\Users\Tibsi_\Desktop\CodePaste\CodePasteConfig.cpp|27|undefined reference to `_imp___ZN15wxItemContainer5ClearEv'|
.objs\CodePasteConfig.o||In function `ZN15wxItemContainer11InsertItemsERK21wxArrayStringsAdapterjPPv16wxClientDataType':|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|145|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|147|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|147|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|154|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|154|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
.objs\CodePasteConfig.o:C:\Users\Tibsi_\Desktop\CodePaste\CodePasteConfig.cpp|32|undefined reference to `_imp___ZN15wxItemContainer5ClearEv'|
.objs\CodePasteConfig.o||In function `ZN15wxItemContainer11InsertItemsERK21wxArrayStringsAdapterjPPv16wxClientDataType':|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|145|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|147|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|147|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|154|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|154|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
.objs\CodePasteConfig.o||In function `ZN15wxItemContainer6InsertERK8wxStringj':|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|145|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
C:\wxWidgets-2.9.1\include\wx\ctrlsub.h|145|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_PKw'|
.objs\CodePasteConfig.o||In function `wxPanel':|
C:\wxWidgets-2.9.1\include\wx\generic\panelg.h|33|undefined reference to `_imp___ZN18wxControlContainerC1Ev'|
.objs\CodePasteConfig.o||In function `~wxControlContainerBase':|
C:\wxWidgets-2.9.1\include\wx\containr.h|48|undefined reference to `_imp___ZTV22wxControlContainerBase'|
.objs\CodePasteConfig.o||In function `wxGet_wxConvLibc':|
C:\wxWidgets-2.9.1\include\wx\strconv.h|574|undefined reference to `_imp__wxConvLibcPtr'|
C:\wxWidgets-2.9.1\include\wx\strconv.h|574|undefined reference to `_imp___Z19wxGet_wxConvLibcPtrv'|
C:\wxWidgets-2.9.1\include\wx\strconv.h|574|undefined reference to `_imp__wxConvLibcPtr'|
.objs\CodePasteConfig.o||In function `ZN8wxString7ImplStrEPKcRK8wxMBConv':|
C:\wxWidgets-2.9.1\include\wx\string.h|536|undefined reference to `_imp__wxConvLibcPtr'|
C:\wxWidgets-2.9.1\include\wx\string.h|536|undefined reference to `_imp___ZN8wxString4nposE'|
C:\wxWidgets-2.9.1\include\wx\string.h|536|undefined reference to `_imp___ZN8wxString10ConvertStrEPKcjRK8wxMBConv'|
.objs\CodePasteConfig.o||In function `ZN22wxScopedCharTypeBufferIwE11GetNullDataEv':|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
.objs\CodePasteConfig.o||In function `wxPanel':|
C:\wxWidgets-2.9.1\include\wx\generic\panelg.h|33|undefined reference to `_imp___ZN18wxControlContainerC1Ev'|
.objs\CodePasteConfig.o||In function `~wxControlContainerBase':|
C:\wxWidgets-2.9.1\include\wx\containr.h|48|undefined reference to `_imp___ZTV22wxControlContainerBase'|
.objs\CodePasteConfig.o||In function `wxGet_wxConvLibc':|
C:\wxWidgets-2.9.1\include\wx\strconv.h|574|undefined reference to `_imp__wxConvLibcPtr'|
C:\wxWidgets-2.9.1\include\wx\strconv.h|574|undefined reference to `_imp___Z19wxGet_wxConvLibcPtrv'|
C:\wxWidgets-2.9.1\include\wx\strconv.h|574|undefined reference to `_imp__wxConvLibcPtr'|
.objs\CodePasteConfig.o||In function `ZN8wxString7ImplStrEPKcRK8wxMBConv':|
C:\wxWidgets-2.9.1\include\wx\string.h|536|undefined reference to `_imp__wxConvLibcPtr'|
C:\wxWidgets-2.9.1\include\wx\string.h|536|undefined reference to `_imp___ZN8wxString4nposE'|
C:\wxWidgets-2.9.1\include\wx\string.h|536|undefined reference to `_imp___ZN8wxString10ConvertStrEPKcjRK8wxMBConv'|
.objs\CodePasteConfig.o||In function `ZN22wxScopedCharTypeBufferIwE11GetNullDataEv':|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
C:\wxWidgets-2.9.1\include\wx\buffer.h|185|undefined reference to `_imp___ZN9wxPrivate18GetUntypedNullDataEv'|
.objs\CodePasteConfig.o||In function `~wxControlContainerBase':|
C:\wxWidgets-2.9.1\include\wx\containr.h|48|undefined reference to `_imp___ZTV22wxControlContainerBase'|
C:\wxWidgets-2.9.1\include\wx\containr.h|48|undefined reference to `_imp___ZTV22wxControlContainerBase'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 7 warnings ===|

--- End quote ---

MortenMacFly:

--- Quote from: tibsi on March 21, 2011, 09:39:46 am ---than can you help me compile this i always get some errors

--- End quote ---
First you should start with using the right wxWidgets version. v2.9.1 is experimental! The proposed version for C::B development is either v2.8.10 or v2.8.11.

Navigation

[0] Message Index

[#] Next page

Go to full version