wx-config --cxx-flags : Error: Unrecognised option

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
goa103
Earned a small fee
Earned a small fee
Posts: 24
Joined: Thu Jun 23, 2005 6:42 pm
Location: Europe > France > Lyon

wx-config --cxx-flags : Error: Unrecognised option

Post by goa103 »

Hello,

Reading some topics it seems some Windows developers managed to build their wxWidgets-based applications using MinGW/MSYS and a magic script called wx-config. I also found the Eclipse page insightful even if it says that the wx-config command doesn't exist under Windows. But I have it and from a MSYS console, I can use it.

But calling it to output default C++ flags I get the following error message :

Code: Select all

$ wx-config --cxx-flags
  *** Error: Unrecognised option: '--cxx-flags'
Use wx-config --help for information on command line options.
It's a bit weird as it perfectly works for library flags :

Code: Select all

$ wx-config --libs     
-L/d/wxWidgets/build-release-dll/./lib  -mthreads  -Wl,--subsystem,windows -mwindows -lwx_msw_xrc-2.6 -lwx_msw_qa-2.6 -lwx_msw_html-2.6 -lwx_msw_adv-2.6 -lwx_msw_core-2.6 -lwx_base_xml-2.6 -lwx_base_net-2.6 -lwx_base-2.6
I found about 10 topics dealing with hundreds of undefined reference errors when building a project. I think these problems are related. The compiler can't link the sources to the libraries as the wx-config doesn't output anything, but an error.

JM.
goa103
Earned a small fee
Earned a small fee
Posts: 24
Joined: Thu Jun 23, 2005 6:42 pm
Location: Europe > France > Lyon

Post by goa103 »

Hello,

I checked the wx-config script to better understand how it works. It seems it's really not meant for Windows even if using it helps a lot. It doesn't avoid Windows developers to manually add paths to include files and libraries. For example it generates [
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Re: wx-config --cxx-flags : Error: Unrecognised option

Post by leio »

goa103 wrote:

Code: Select all

$ wx-config --cxx-flags
  *** Error: Unrecognised option: '--cxx-flags'
Use wx-config --help for information on command line options.
wx-config --help clearly says that it's --cxxflags, not --cxx-flags.
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
goa103
Earned a small fee
Earned a small fee
Posts: 24
Joined: Thu Jun 23, 2005 6:42 pm
Location: Europe > France > Lyon

Re: wx-config --cxx-flags : Error: Unrecognised option

Post by goa103 »

leio wrote:wx-config --help clearly says that it's --cxxflags, not --cxx-flags.
That's right ! I didn't even notice it as I was copying and pasting the command from the Eclipse page. I edited the text of that page and now the command is correct.

Thanks.
Post Reply