News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Building Code::Blocks Plugin Wizard w/MSW

Started by Pecan, October 26, 2005, 11:47:20 PM

Previous topic - Next topic

Pecan

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

Pecan

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

Pecan

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

Urxae

Quote from: Pecan on October 27, 2005, 08:06:15 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.

Pecan

#4
Thanks Urxae,
I failed to recompile C::B.
I get it, I'll persue debug-compiling C::B tomorrow.

Pecan

Pecan

#5
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

rickg22

I usually build the entire sourcecode and plugins.

Pecan

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

rickg22

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.

mandrav

Quote from: rickg22 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.

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...

Pecan

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

rickg22

Quote from: mandrav on October 28, 2005, 10:09:25 AM
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:

Pecan

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

mandrav

@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

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