Author Topic: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.  (Read 15377 times)

Offline momaa

  • Multiple posting newcomer
  • *
  • Posts: 16
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.
----------------

Wx-config does not know about these options:
 --static=yes --unicode=no --debug=yes 

But it accepts these arguments:
 --static=no  --unicode=yes  --debug=no
----------------

Wx-config's help page reports this:
$ wx-config  --help

 wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--release] [--version-full]
           [--list] [--host=HOST] [--toolkit=TOOLKIT] [--universal[=yes|no]]
           [--unicode[=yes|no]] [--debug[=yes|no]] [--static[=yes|no]]
           [--version[=VERSION]] [--basename] [--cc] [--cppflags] [--cflags]
           [--cxxflags] [--rezflags] [--libs] [--cxx] [--ld] [--linkdeps]
           [--utility=UTIL] [LIB ...]
----------------

This Ubuntu installment has these package versions:

$ wx-config --version
2.6.3

$ apt-cache show libwxbase2.6-0
Version: 2.6.3.2.1.5ubuntu4
Replaces: libwxgtk2.6-0 (<< 2.6.3.2)
Depends: libc6 (>= 2.5-0ubuntu1), libexpat1 (>= 1.95.8), libgcc1 (>= 1:4.1.1-21ubuntu1), libstdc++6 (>= 4.1.1-21ubuntu1), zlib1g (>= 1:1.2.1)
Filename: pool/universe/w/wxwidgets2.6/libwxbase2.6-0_2.6.3.2.1.5ubuntu4_i386.deb

$ apt-cache show libwxgtk2.6-dev
Original-Maintainer: Ron Lee <ron --at-- debian.org>
Architecture: i386
Source: wxwidgets2.6
Version: 2.6.3.2.1.5ubuntu4
Depends: wx2.6-headers (= 2.6.3.2.1.5ubuntu4), libwxgtk2.6-0 (= 2.6.3.2.1.5ubuntu4), libwxbase2.6-dev (= 2.6.3.2.1.5ubuntu4), libc6-dev
Filename: pool/universe/w/wxwidgets2.6/libwxgtk2.6-dev_2.6.3.2.1.5ubuntu4_i386.debAttaxhed a screenshot.

A screenshot: http://www.futuredesktop.org/tmp/Screenshot-1.png

Of course, the project compiles succesfully if I remove the bad --arguments.
« Last Edit: February 04, 2007, 02:41:53 pm by momaa »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6511
    • My Best Post
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #1 on: February 04, 2007, 02:43:32 pm »
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.

IMHO, It is saying that it can NOT find a compiled version on wxWidgets that matches what you are requesting.

Do you have wxWidgets 2.6 compiled on your machine with static=yes --unicode=no --debug=yes ?

If you do, it might need to be told where to find it, using --prefix.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #2 on: February 04, 2007, 03:59:36 pm »
The wizard requests you to select appropriate version of wx lib. Wizard does not check existence of required wx configuration in Linux. Thus always select the appropriate version or you'll face such errors.

To check which configuration(s) you have type wx-config --list in the shell. It will give you list of available configurations. Based in that output select the appropriate options in wizard.  :)
Be a part of the solution, not a part of the problem.

Offline momaa

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #3 on: February 04, 2007, 06:43:29 pm »
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.
« Last Edit: February 04, 2007, 06:47:11 pm by momaa »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6511
    • My Best Post
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #4 on: February 04, 2007, 06:46:05 pm »
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.

So what the Newbies are never happy in my view because they think that they should NOT have to do any work to learn how to code.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline momaa

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #5 on: February 04, 2007, 07:09:13 pm »
Do not be silly.
A newbie should be able to create a minimum app using the wizard -- just by clicking the Next> button.
Luckily Linux has other IDEs that fulfill this requirement.
« Last Edit: February 05, 2007, 02:23:32 pm by momaa »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #6 on: February 04, 2007, 07:14:49 pm »
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.

It's very difficult to satisfy everyone. I've tried to modify it in such a way so that it can satisfy most of the people but NOT each and everyone. You have started with installing wxBase which fewer developers use.

It's possible to add another page asking user to specify the toolkits that they are using, host, prefix, exec-prefix, etc. These jargons will be utterly confusing to most of the newbies contrary to your belief.

The Linux wizard is simple. It doesn't do a lot of things which Windows part do. But to be honest before I commit some advanced features, I need better understanding of wx, Linux and most importantly C::B sdk.  :)
Be a part of the solution, not a part of the problem.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #7 on: February 04, 2007, 07:27:30 pm »
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.

FYI wxWidgets comes with different lib configurations (10-15+). How can we come to know that all users are using a particular configuration??  :o

The wizard is provided to help user configure their project for a particular lib config. But if you use it blindly it's not C::B's fault. Wizard warns you that you have to select an appropriate lib config or otherwise it will fail to compile.

If other IDEs allow you to click Next button to generate a project, then possibly you are locked to a particular configuration. It's good to start but bad to understand the beauty of other configs.
Be a part of the solution, not a part of the problem.

Offline momaa

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #8 on: February 05, 2007, 02:26:44 pm »
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.

« Last Edit: February 05, 2007, 02:28:55 pm by momaa »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6511
    • My Best Post
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #9 on: February 05, 2007, 04:34:24 pm »
FYI:

In case you did not know a port of wx-config exists for windows. http://code.google.com/p/wx-config-win/
Sorry if it was already mentioned, I have not read the whole thread.

Tim S

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2126
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #10 on: February 06, 2007, 05:23:36 am »
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.



I also vote for a simple basic `wx-config --cflags` and `wx-config --libs`

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.

I had to remove the wizard and replace it with an older version to figure out where the problems were.

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.


« Last Edit: February 06, 2007, 05:34:31 am by Pecan »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #11 on: February 06, 2007, 06:47:20 am »
Ok. I'll rearrange the page. Please wait for the update.

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.

NO, Wizard's intention is not to create more problems. Rather it's intention is to help users. Honestly speaking please don't blame the wizard because you are unaware of the wx-lib configuration that your system have.

I also vote for a simple basic `wx-config --cflags` and `wx-config --libs`

wx-config --cflags will use the default configuration. What is your opinion on Debug and Release Target? Means do you think it would be appropriate to add same command both in Debug and Release Target?

Regards,

Biplab
« Last Edit: February 06, 2007, 07:01:48 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #12 on: February 06, 2007, 08:55:33 am »
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.
Be patient!
This bug will be fixed soon...

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #13 on: February 06, 2007, 09:05:52 am »
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.

Thanks for the suggestion.  :D

I have already regrouped it, but I've kept it in a single page. Is there any way to disable/enable a part of wizard page dynamically (means as soon as an user selects an option)?

If it's not possible, then I'll split it into two pages.  :)
Be a part of the solution, not a part of the problem.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: wxWidgets project in Ubuntu Linux: wx-config error. Unknown flags.
« Reply #14 on: February 06, 2007, 09:29:10 am »
Quote
Is 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.
Be patient!
This bug will be fixed soon...