Author Topic: Building Code::Blocks Plugin Wizard w/MSW  (Read 32305 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Building Code::Blocks Plugin Wizard w/MSW
« on: October 26, 2005, 11:47:20 pm »
C::B RC2,
wxWidgets MSW2.6.1
WinXPsp2

Has anyone had experience compiling the Code::Blocks Plugin Wizard
under RC2 using MSW2.6.1??

The dialog comes up, but all the text is blank and C::B is
hung (hanged??). I have to kill it with windows task manager.

I've put a trap in all the PluginWizarddlg.cpp routines; only
OnUpdateUI is being called.

Any advice would be appreciated.
Thanks
Pecan

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #1 on: October 27, 2005, 07:23:13 pm »
I've traced the problem down to a loop when

       if (dlg.ShowModal() != wxID_OK)
            return -1;

is called in Execute();

GDB loses control at that point and never returns. However,
under GDB, the whole dialog window WITH its text show up.
But C::B, "the wiz", and GDB are hanged.

BTW, is there a way to make GDB regain control from
within a loop??

Am going to generate a BUILD=debug DLL this afternoon and see
if I can drill down any further.

Anyone else seen this problem??

Thanks, Pecan

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #2 on: October 27, 2005, 08:06:15 pm »
Ok, another step backward,

when I link a plugin (any plugin) with libwxmsw26d.a (BUILD=debug version)
the plugin does not show up in the plugin menu.

It also disappears from the "Configure Plugins" dialog.

Is there something I can do about this??

thanks, Pecan

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #3 on: October 27, 2005, 08:44:47 pm »
when I link a plugin (any plugin) with libwxmsw26d.a (BUILD=debug version)
the plugin does not show up in the plugin menu.

It also disappears from the "Configure Plugins" dialog.

Is there something I can do about this??

Did you recompile Code::Blocks with the same debug wxWidgets DLL? If not, doing so will likely solve your problem.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #4 on: October 27, 2005, 11:56:46 pm »
Thanks Urxae,
I failed to recompile C::B.
I get it, I'll persue debug-compiling C::B tomorrow.

Pecan
« Last Edit: October 28, 2005, 12:06:13 am by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #5 on: October 28, 2005, 12:04:21 am »
Further inspection.. C::B is *not* in a loop after the
dlg.ShowModal() call. My cpu meter is at 0 (zip, nada).

I now notice that the tab key will move to the first
text entry area of the dialog window, but it will take
no character input.

Building ClassWizard behaves exactly the same as
PluginWizard. Dlg shows, but after {tab} or {enter} all
keys are ignored.

{Enter} will dismiss the dialog, but C::B is still hung.
I have to tskill it.

So.. seems plugins are ignoring me again.

I went back to 2.4.2 and compiled PluginWizard there.
It works fine.

All this has something to do with something not passing key
input to the dlgs.

Is anyone else having any success building the plugins
under wxMSW261 ??

Thanks,
Pecan
« Last Edit: October 28, 2005, 12:07:15 am by Pecan »

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #6 on: October 28, 2005, 12:57:15 am »
I usually build the entire sourcecode and plugins.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #7 on: October 28, 2005, 02:41:26 am »
Finally, success!

But to get the compiled 2.6.1 PlugInWizard to run, C::B had to be
compiled as well.

But why? If the distributed C::B was built with wxWidgets 2.6.1
and the plugin is compiled with wxWidgets 2.6.1 and linked with ONLY 2.6.1,
why won't the plugin work??

This means that a user HAS to download and compile C::B in
order to contribute/compile a plugin. And, there is no assurance that a plugin
built on my system with wxMSW2.6.1 will work on anyone elses
wxMSW2.6.1

What am I misunderstanding here?

Very confused
Thanks for the help and patience
Pecan

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #8 on: October 28, 2005, 03:41:09 am »
Perhaps the wxWidgets DLL you bulit was compiled with a different version of GCC.

There's a current discussion regarding the distribution of wxwidgets libs along with the SDK.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #9 on: October 28, 2005, 10:09:25 am »
Perhaps the wxWidgets DLL you bulit was compiled with a different version of GCC.

There's a current discussion regarding the distribution of wxwidgets libs along with the SDK.

Maybe people have missed it (even Rick?), but the SDK download contains libwxmsw26.a that is the import library for the wxmsw26_gcc_cb.dll that is installed with C::B. To build a plugin you should use this import library...
Be patient!
This bug will be fixed soon...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #10 on: October 28, 2005, 03:35:39 pm »
Thanks rickg22 & mandrav

I started from scratch last night by wiping C::B off my system.
I re-downloaded C::Brc2 with _mingw and installed it.
I then re-installed the rc2-sdk

I created a new plugin project.
I copied pluginwizard from the src.tgz file to a folder, included pluginwizard files
into the project and deleted the fake h&cpp created by the wizard.

I then removed all directory references in the project options and reinserted them
as callled for by re-building the project on each err. I made sure that the codeblocks folder and sdk had preference over any wxWidget261 reference.

When linking, I specifically only allowed reference to the DLL's in the codeblocks folder. It linked.

I then copied the DLL to the ...\codeblocks\plugins folder.

It still hangs. The dlg shows, and you can use the tab or enter key once only.
Then its time to kill codeblocks. No other action is possible.

What gives. Have I mis-stepped somewhere??

Thanks
Pecan

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #11 on: October 28, 2005, 03:41:09 pm »
Maybe people have missed it (even Rick?), but the SDK download contains libwxmsw26.a

Ah, sorry. I didn't download the SDK, so I assummed that since the user didn't had it there... :lol:
I guess I need to be more suspicious of users from now on.  :mrgreen:

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #12 on: October 28, 2005, 08:43:07 pm »
Linking with the *.a files in the SDK does not work either.

Another wierdness is, the size of the pluginwizard.dll in the
distribution is 339,456 bytes. While the one I link with either
\codeblocks\*.dll or \codeblocks\SDK\lib\*.a is only 191,515 bytes.

Is there a clue there?

I'd really like to figure this one out. If a user cannot compile the
plugins, it means only developers can create them. Secondly, there
is no way that a developer can be assured her/his work will run
with anyone elses C::B.

thanks
Pecan
 

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #13 on: October 28, 2005, 09:20:29 pm »
@Pecan: can you post your test project somewhere?
I 'm sure you must be doing something wrong because I 've tried to build a new plugin in a clean environment and worked like a charm.

Test environment:

Win98 (yes I know ;), I just want to test compatibility)
C::B 1.0rc2 (with MinGW)
C::B SDK
wxWidgets-2.6.1 just unpacked, not even built (only the headers are actually needed).
Nothing else. Just a pristine Win98 setup.
Be patient!
This bug will be fixed soon...

Zlika

  • Guest
Re: Building Code::Blocks Plugin Wizard w/MSW
« Reply #14 on: October 28, 2005, 10:02:58 pm »
I have the same problem than Pecan to build my own plugins!
I linked them with the libs contain in the SDK, it compiles OK but crashes C::B when used!
I had not at all this pb with wx2.4.2. If someone please could help me, I want to make some minor changes in the Profiler plugin but I can't test it anymore!  :cry:

Zlika