Author Topic: Plug-in creation problem  (Read 2804 times)

rhino

  • Guest
Plug-in creation problem
« on: June 05, 2010, 02:28:34 am »
Hi, it's me again.
I wanted to create a simple plug-in for C::B which would create a resource file, put some initial values into it and add it into the current project.
I have started reading this tutorial: http://wiki.codeblocks.org/index.php?title=Creating_a_simple_%22Hello_World%22_plugin
I already have the sources on my hard drive so I was ready to start creating my plug-in.
I have started a new plug-in project and proceeded.
The first thing which confused me, was the directory which I should add to the 'Search Directories': 'CodeBlocks\sdk\include' and 'CodeBlocks\sdk\lib'.
In the directory where I hold the C::B source (C:\CodeBlocksSrc\cb\src), there is 'include', but there's no 'lib' directory...
I ignored it and tried to build the plug-in.
Then, although the plug-in compiled succesfully, I couldn't install it.
When I went to the Plugins->Manage Plugins menu, selected 'Install new' and then chose my .cbplugin file, a progressbar showed up for a second, then it disappeared and I got a message box with the following content:
'One or more plugins were not installed successfully:
<the path to the plugin here>' - and the plug-in didn't show up in the installed plug-ins list.
I saw an inscription at the top of the wiki-page:
'This article contains outdated information.
You can help the Code::Blocks Wiki by updating the article.'
In fact I've seen it before, but I started reading the article and I hoped that won't matter. But unfortunately, it does.
Does there exist any other tutorial which is up to date so I can learn how to build my plugin for version 10.05?
« Last Edit: June 05, 2010, 02:30:30 am by rhino »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Plug-in creation problem
« Reply #1 on: June 05, 2010, 03:04:18 am »
Do you know the steps to compiler Code::Blocks from SVN?

The directions for the plug-ins most likely assume you know the above info.
Too tired to read the directions and see if they make sense.
Might try tomorrow.

I just did some testing; the first thing I saw as a possible area.
Must have the compiler global variable "cb" defined for wizard to work right.
http://wiki.codeblocks.org/index.php?title=Recommended_global_variables
You must set the base value to the CB source code folder the holds the sub-folder SDK

I am still looking at the directions; skipped over a lot of remarks.

The plug-in did not work for me; not sure if I did something wrong or what been about 18 months since I made a simple plug-in.


IIRC, this was what I tried last time.
http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build

Tim S.
« Last Edit: June 06, 2010, 01:40:21 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Plug-in creation problem
« Reply #2 on: June 06, 2010, 01:41:28 am »
I have given up try to get the plug-in I created using the directions to work; not sure if it is my setup or a bug in Code::Blocks.

I am guessing the Plug-In template may need to be updated.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Plug-in creation problem
« Reply #3 on: June 06, 2010, 03:20:07 am »
I found the cause on my Computer; they are now using the DW2 version of TDM GCC 4.4.1.

After changing compiler it worked OK for me doing it how I think should work; did not really follow the wiki directions.

The values on the Compiler I used which I believe matches TDM GCC 4.4.1 DW2:

Code
gcc version 4.4.1 (TDM-2 mingw32)
GNU ld (GNU Binutils) 2.19.1
GNU windres (GNU Binutils) 2.19.1
GNU dlltool (GNU Binutils) 2.19.1
#define __MINGW32_VERSION           3.16
#define __W32API_VERSION 3.13
« Last Edit: June 06, 2010, 03:25:24 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org