Hello,
System: Ubuntu Feisty HERD 3 (test 3 of the upcoming Ubuntu 7.04, to released in April 2007)
Code::Blocks IDE: svn build rev 3566, feb 4.
I created a simple wxWidgets 2.6 project using the wizard.
When I compile the project, it says that: "No config found to match: wx-config --version=2.6 --static=yes --unicode=no --debug=yes --cflags"
If I type the wx-config command on the command line, it reveals that some of the --flags are unknown.
$ wx-config --version=2.6 --static=yes --unicode=no --debug=yes --cflags
Warning: No config found to match: /usr/bin/wx-config --version=2.6 --static=yes --unicode=no --debug=yes --cflags
in /usr/lib/wx/config
If you require this configuration, please install the desired
library build. If this is part of an automated configuration
test and no other errors occur, you may safely ignore it.
You may use wx-config --list to see all configs available in
the default prefix.
This Ubuntu machine has a default wxWidgets installation.
$ wx-config --list
Default config is gtk2-unicode-release-2.6
Default config will be used for output
Alternate matches:
base-unicode-release-2.6
It is impossible to create a wxWidgets 2.6 project (using the wizard) that compiles without manual tuning.
Newbies will not be happy.
Ok. Thanks for the explanation.
This Ubuntu machine has a default wxWidgets installation.
$ wx-config --list
Default config is gtk2-unicode-release-2.6
Default config will be used for output
Alternate matches:
base-unicode-release-2.6
It is impossible to create a wxWidgets 2.6 project (using the wizard) that compiles without manual tuning.
Newbies will not be happy.
Do not be silly.
A newbie should be able to create a minimum app using the wizard -- just be clicking the Next> button.
Luckily Linux has other IDEs that fulfill that requirement.
Could we have 2 selections in the wxWidgets' wizard.
o....Create a basic wxWidgets application.
o.....Create wxWidgets application with advanced options (expert mode).
---------------------------
The first option will simply create a functional basic form with minimum wx-config arguments. The second option will ask the user what features (wx-config options) to include and compile with.
On Linux it took me about 20 minutes to figure out why my simple test pgm was getting all those debug and wierd errors I'd never seen before.If user installs wx-libs in Linux then they should be knowing the configurations.
I don't think a wizard should be causing more problems, as opposed to being a help. Introducing all these features should serve the users better on an advanced page I think.
I also vote for a simple basic `wx-config --cflags` and `wx-config --libs`
Biplab, the only way you could satisfy everyone would be to add a single checkbox labeled "Use default wxWidgets settings" which, if checked, would use `wx-config --cflags` and `wx-config --libs` for both targets. Then newbies wouldn't get confused and more advanced users would use the other options.
Is there any way to disable/enable a part of wizard page dynamically (means as soon as an user selects an option)?
QuoteIs there any way to disable/enable a part of wizard page dynamically (means as soon as an user selects an option)?
Hehe, as a matter of fact it aready is possible ;).
When clicking any button/checkbox/combobox/choice/listbox/radiobox in your XRC page, the script function OnClick_<control_name> is called. In there, you can use Wizard.EnableWindow(_T("control_name"), true/false) to enable/disable any control on the page.
You should also know that you can "detect" what wx configurations are installed by using IO.ExecuteAndGetOutput("wx-config --list") and parsing the results ;).
Note though that this will trigger a security dialog so make sure you prepare the user for it.
But how many possible configurations are available in Linux? E.g., gtk2-*, gtk-*, x11-*, and others??
Tested and Committed. In Revision 3574.
The Advanced options shall be unavailable if user selects "Use default wxWidgets settings".
Thanks to momaa, Pecan and Mandrav. :)
Biplab, thanks for that. And I *do* appreciate all your hard work.
When debugging CB for hours, or figuring out how some code works, it's important to me to just whip up a simple test case fast and easy.
Spending 20 minutes figuring out why a simple test case won't work makes us old guys forget why we were doing it in the first place.
I have a number of wxWidget configurations on my machine, and I don't want to have to remember the particulars of which one I last set each time I create a test program. The simple wx-config --cflags and --libs will set them for me. Then I can get back to debugging or stepping through the code.
thanks again
pecan
@Mandrav, I was trying to use IO.ExecuteAndGetOutput(_T("`wx-config --list`")); But it is returning a NULL string.
I was getting the security warning and I allowed the script to run. But still no result. I have run C::B in SU mode and in normal user mode. But the result is same. What could be the problem??
Regards,
Biplab
wxString ExecuteAndGetOutput(const wxString& command)
{
.... ......
wxExecute(command, output, wxEXEC_NODISABLE);
return GetStringFromArray(output);
}
It returns a wxString. But there might be bug in the last line of following code (I'm not absolutely sure).