Author Topic: plugin development  (Read 6811 times)

utku

  • Guest
plugin development
« on: January 25, 2006, 03:58:32 pm »
Hi all,

I am looking for tutorials or howto's  regarding to plugin development. Actually I am considering writing a navigator plugin for code editor which makes it possible to move between definition and declerations, allows user to put landmarks on the code etc. But I am not sure if I can so want to play around a bit.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: plugin development
« Reply #1 on: January 25, 2006, 04:03:26 pm »
Look at Developing for Code::Blocks wiki section.
Be patient!
This bug will be fixed soon...

utku

  • Guest
Re: plugin development
« Reply #2 on: January 25, 2006, 04:15:36 pm »
upss, I didn't notice wiki, thanks

utku

  • Guest
Re: plugin development
« Reply #3 on: January 25, 2006, 05:12:55 pm »
I have compiled helloworld plugin but the DLL can not be loaded on start and throws an exception telling an entry function in codeblocks.dll regarding to loggin is not found. I am using nightly buid, is there a possiblity of a problem becouse of the SDK/example date?

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: plugin development
« Reply #4 on: January 25, 2006, 09:33:58 pm »
I have compiled helloworld plugin but the DLL can not be loaded on start and throws an exception telling an entry function in codeblocks.dll regarding to loggin is not found. I am using nightly buid, is there a possiblity of a problem becouse of the SDK/example date?

If you are using a downloaded SDK, it will probably be the SDK for RC2. This is by far no longer compatible with any nightly build. In order for linkage to be possible between your plugin and codeblocks.dll, they need to originate from the same source code and be compiled with the same settings. I would therefore advise you to consider getting the latest SVN revision (you can find instructions for this at the home page) and compile Code::Blocks, as this will make sure any plugin you build from whithin your environment is compatible with your Code::Blocks binary.

It would take more effort, but I can tell you that it pays. Not only are linkage problems eliminated, but being able to browse the source code of the application you're writing a plugin for is a HUGE help.

Good Luck :)

Offline severach

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: plugin development
« Reply #5 on: January 26, 2006, 03:22:31 am »
Has anyone considered making a C only plugin interface so it will be compatible across version, builds, and compilers? A C++ interface may be handy for rapid development but it will be forever plagued with compatibility problems which will limit plugin availability to only those built regularly by the Code::Blocks team. Private plugins would require constant rebuilds and commercial plugins are infeasible.

A C interface would be a bit more efficient too.

Scintilla is C ready already.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: plugin development
« Reply #6 on: January 26, 2006, 03:44:43 am »
Having a C only plugin wouldn't make much sense since most of Code::Blocks is written in C++ (¿SDK 100% C++?) and also wxWidgets. It would be very problematic to get a C plugin showing a configuration dialog, adding a toolbar, a menu, and interfacing with everything in the SDK. It'd need to be some kind of hack.

I think it's easier to just rebuild the plugin :)

utku

  • Guest
Re: plugin development
« Reply #7 on: January 26, 2006, 06:24:56 am »
well, I have installed SVN, downloaded current 1863, recompiled wx to support unicode, and finally compiled c::b without major problems but when I run the executable it crashes instantly. I do not have a clue about this. :(

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: plugin development
« Reply #8 on: January 26, 2006, 10:33:24 am »
well, I have installed SVN, downloaded current 1863, recompiled wx to support unicode, and finally compiled c::b without major problems but when I run the executable it crashes instantly. I do not have a clue about this. :(

Incompatibilities between C::B and some old plugins may cause it to crash in some cases. You probably just took the first step which is building C::B itself. After you built the C::B main program and core plugins, open the ContribPlugins.Workspace file, which contains the community contributed plugins. Build this workspace and if everything went fine, go to the directory where you have the C::B source. You should see the update.bat batch file there. Execute it. You should have a final version of all your binaries inside the "output" directory.

HTH

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: plugin development
« Reply #9 on: January 26, 2006, 11:20:02 am »
well, I have installed SVN, downloaded current 1863, recompiled wx to support unicode, and finally compiled c::b without major problems but when I run the executable it crashes instantly. I do not have a clue about this. :(

did you run src/update.bat ? (for Windows builds) before running the codeblocks.exe
this is necessary to create all the directories with resources

utku

  • Guest
Re: plugin development
« Reply #10 on: January 26, 2006, 05:10:13 pm »
After compiling plugins and using update.bat I got it working. Thanks :)
« Last Edit: January 26, 2006, 05:14:49 pm by utku »