News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

hello word plugin install in codeblocks problem

Started by anandamu16, February 07, 2017, 08:04:10 AM

Previous topic - Next topic

anandamu16


I created the hello world plugin following this "http://wiki.codeblocks.org/index.php/Creating_a_simple_%22Hello_World%22_plugin".
After building up the plugin correctly, I go to settings->plugin->manage plugins-> Install new and then gave the helloworldplugin.cbp path.

But the popup says can't load your helloworldplugin. Any idea, whats the reason?

Tools used:
Codeblocks 16.01 IDE
Codeblocks src code from "http://codeblocks.org/downloads/25"       codeblocks_16.01.tar.gz
wxwidget2.8.12 (shared=1, monolithic=1, unicode=1, build= release as well as debug

oBFusCATed

Something is not right with your symbols. Probably you're mixing compiler or libraries.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

anandamu16

QuoteSomething is not right with your symbols. Probably you're mixing compiler or libraries.

What do you mean by symbols? I rechecked the project settings and it seems all fine.
For the reference, i added screenshot of my project setings

BlueHazzard

by symbols he means the exported/imported function from dynamic/static libraries...
Your problem is probably that you are using two different compilers for the codeblocks libraries and your plugin libraries
or you are using two different sdks

Have you build codeblocks by yourself?
What compiler do you use?

QuoteAfter building up the plugin correctly, I go to settings->plugin->manage plugins-> Install new and then gave the helloworldplugin.cbp path.
is a plugin file generated?

anandamu16

Thanks BlueHazzard,

From your reply, I get an idea to make a plugin from the "codeblocks.exe" that I have generated on building sdk code.
I was successful to build the plugin and also succeeded to install it.

But I have some questions, If someone can answer:
1- Is it so, that if I want to build plugins for codeblocks. First I need to build codeblocks sdk to get Codeblocks.exe and then generate plugin through that codeblocks.exe only and then only those plugins can be successfully installed into this IDE. I mean to ask, if I download a Default codeblocks binary, Install it, Create a plugin and install it in the same IDE... is that possible?

2- In codeblocks svn source code, we have 2 files: One is "codeblocks.cbp" and other is "codeblocks.workspace". So If I want to build my separate version of codeblocks, I need to build only "codeblocks.cbp" or "codeblocks.workspace" also? and whats the difference in building both?


QuoteHave you build codeblocks by yourself?
Yes

QuoteWhat compiler do you use?
Mingw 5.3

Quoteis a plugin file generated?
Yes, all plugin files generated i.e; .cbplugin extension, zip file etc.

- Anand A.

stahta01

#5
Quote from: anandamu16 on February 08, 2017, 07:01:10 AM

But I have some questions, If someone can answer:

2- In codeblocks svn source code, we have 2 files: One is "codeblocks.cbp" and other is "codeblocks.workspace". So If I want to build my separate version of codeblocks, I need to build only "codeblocks.cbp" or "codeblocks.workspace" also? and whats the difference in building both?

- Anand A.

The codeblocks.workspace builds the contrib plugins and likely builds the core plugins.
While "codeblocks.cbp" builds only the core plugins.

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

anandamu16

okey thanks.

Can you help to clear my doubt on plugin?
Quote
But I have some questions, If someone can answer:
1- Is it so, that if I want to build plugins for codeblocks. First I need to build codeblocks sdk to get Codeblocks.exe and then generate plugin through that codeblocks.exe only and then only those plugins can be successfully installed into this IDE. I mean to ask, if I download a Default codeblocks binary, Install it, Create a plugin and install it in the same IDE... is that possible?

BlueHazzard

The important things are that the compiler version of the codeblocks.exe, codeblocks.dll, wxWidgets.dll and your plugin dll are the same. This is because we use C++ as binding and for this the ABI has to be the same. This is "only" the case with the same compilers.

So the best ways to develop plugins is to compile codeblocks on your system and develop with this system. And for this (according to my opinion) the best way to distribute plugins is as source code.

IF you want to distribute your plugin as binary it would be the best to use the same compiler as the nightlys are build. You can look into this thread to get the information but probably it is some tdm gcc mingw

stahta01

Quote from: BlueHazzard on February 08, 2017, 02:51:15 PM
IF you want to distribute your plugin as binary it would be the best to use the same compiler as the nightlys are build. You can look into this thread to get the information but probably it is some tdm gcc mingw

From http://forums.next.codeblocks.org/index.php/topic,3299.0.html
Quote15) all is now build with TDM-GCC 5.1.0, wxWidgets 2.8.12 (11 April 2016)
Therefor it is advised to also redownload the mingwm dll and the wx dll. Since these have also been rebuild with the TDM GCC 5.1.0 compiler (sjlj flavor).

http://wiki.codeblocks.org/index.php/Linking_the_plugin_to_a_Nightly_Build

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

anandamu16

Thanks BlueHazzard for the help. I guess, I must use same compiler version everywhere.
Thanks Tim, for guiding. Anyway, I have followed that link a,ready but still I was not able to install my plugin in default codeblocks

stahta01

#10
Quote from: anandamu16 on February 07, 2017, 08:04:10 AM

I created the hello world plugin following this "http://wiki.codeblocks.org/index.php/Creating_a_simple_%22Hello_World%22_plugin".
After building up the plugin correctly, I go to settings->plugin->manage plugins-> Install new and then gave the helloworldplugin.cbp path.

But the popup says can't load your helloworldplugin. Any idea, whats the reason?

Tools used:
Codeblocks 16.01 IDE
Codeblocks src code from "http://codeblocks.org/downloads/25"       codeblocks_16.01.tar.gz
wxwidget2.8.12 (shared=1, monolithic=1, unicode=1, build= release as well as debug

What was the extact name you entered? (It should normally end in something like cbplugin this is from memory NOT done a plugin install in a few month)

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

anandamu16

exact name was: helloworldplugin.cbplugin.

Sorry, Earlier I wrote it as helloworldplugin.cbp, My bad.

BlueHazzard

remember: if you change a compiling/linking command, or a compiler ALWAYS rebuild by Build->Clean and Build->Build or Build->Rebuild

Also i would clear manually old libraries from the installation folder of codeblocks