Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Code snippet plugin
artoj:
OK, first public version is now ready and you can download it from here: http://ajonsson.kapsi.fi/files/codesnippets.zip.
It uses external XML file called codesnippets.xml to save the snippets. This file is saved to Code::Blocks' config directory.
Now, the most important thing, I'm unable to build this plugin on Windows. The reason is beoynd my knowledge. You can read the issue from this topic: http://forums.codeblocks.org/index.php?topic=3804.0. *nix building works fine.
The zip file has a readme in it, it should answer most of your questions.
MortenMacFly:
--- Quote from: artoj on August 14, 2006, 02:35:11 pm ---Now, the most important thing, I'm unable to build this plugin on Windows.
--- End quote ---
Nice work! And I can tell you: I can compile this nicely under Windows. However, I had to make some adjustments to the project file. Please find my variant attached to this post for your inspection. I'm not sure if this will fix your issue, too - but it's worth a try... ;-)
[attachment deleted by admin]
killerbot:
I could build it too, first had some linker ?warnings?
with Morton's adjustment (place the plug-in in a subdir of the contrib dir !!), those warnings are gone , this is my output (the update.bat is not present yet, therefor the little error at the end) :
--- Quote ----------------- Build: Debug - Win32 in Code Snippets Plugin ---------------
Compiling: codesnippetstreectrl.cpp
Compiling: codesnippetswindow.cpp
Compiling: snippetitemdata.cpp
Compiling: codesnippets.cpp
In file included from codesnippetswindow.h:24,
from codesnippets.cpp:32:
C:/Projects/wxWidgets-2.6.3/include/wx/dnd.h:53: warning: inline function `bool wxIsDragResultOk(wxDragResult)' declared as dllimport: attribute ignored
Linking dynamic library: ..\..\..\devel\share\CodeBlocks\plugins\codesnippets.dll
Running project post-build steps
update.bat
Execution of 'update.bat' in 'C:\Projects\CodeBlocks\src\plugins\contrib\codesnippets' failed.
Nothing to be done.
--- End quote ---
MortenMacFly:
--- Quote from: killerbot on August 14, 2006, 03:35:15 pm ---Execution of 'update.bat' in 'C:\Projects\CodeBlocks\src\plugins\contrib\codesnippets' failed.
Nothing to be done.
--- End quote ---
Ah yes - I've forgotten this. I've added a batch file that copies the images for me, here is the content of update.bat (to be placed in the plugin's directory):
--- Code: ---@echo off
cls
md ..\..\..\devel\share\CodeBlocks\images\codesnippets > nul 2>&1
md ..\..\..\output\share\CodeBlocks\images\codesnippets > nul 2>&1
copy resources\*.png ..\..\..\devel\share\CodeBlocks\images\codesnippets\ > nul 2>&1
copy resources\*.png ..\..\..\output\share\CodeBlocks\images\codesnippets\ > nul 2>&1
--- End code ---
BTW: What I've also done is the re-order how the libs are linked to the plugin and (!) to add the tixml lib into linkage. Thus the warnings were gone and everything is fine.
With regards, Morten.
killerbot:
Both Morton and I have put the plug-in in our source tree at the level on contributed plug-ins. Hint hint ;-)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version