[2.8.10, Windows XP/cygwin, gcc] errors at make

4 views
Skip to first unread message

Daniel

unread,
Nov 8, 2009, 12:13:04 PM11/8/09
to wx-users
Trying some Wxwidgets stuff in my own cpp and I get this error among
some:

Daniel@DANSHOME ~/tb
$ make
g++ -Wall -g -o0 client.cpp player.cpp -o tbclient.exe
In file included from client.cpp:7:
client.h:4:19: wx/wx.h: No such file or directory
...

I havn't anything special in the make file at this stage.

Iulian-Nicu Șerbănoiu

unread,
Nov 8, 2009, 12:29:16 PM11/8/09
to wx-u...@googlegroups.com
On Sun, Nov 8, 2009 at 7:13 PM, Daniel <danw...@gmail.com> wrote:
>
> Trying some Wxwidgets stuff in my own cpp and I get this error among
> some:
>
> Daniel@DANSHOME ~/tb
> $ make
> g++  -Wall -g -o0 client.cpp player.cpp  -o tbclient.exe
> In file included from client.cpp:7:
> client.h:4:19: wx/wx.h: No such file or directory
> ...
>
On linux:

Have you tried adding the `wx-config --cflags` flag for compilation.
If this works you should add `wx-config --libs` flag for linking.

On windows:

you should manually add the path to the include directory of wx:

g++ -I PATH_TO_WX_WIDGETS [that's -I with capital i, not small L]

> I havn't anything special in the make file at this stage.
> >
>



--
Iulian Şerbănoiu
MinVG - http://minvg.sourceforge.net

Daniel

unread,
Nov 8, 2009, 1:09:18 PM11/8/09
to wx-users
I tried the "wx-config" in my make file but I got an error:

$ make
g++ -Wall -g -o0 client.cpp player.cpp -o tbclient.exe -I C:
\wxWidgets-2.8.10
\include\wx wx-config --cxxflags
g++: wx-config: No such file or directory
cc1plus: error: unrecognized command line option "-fcxxflags"
cc1plus: error: unrecognized command line option "-fcxxflags"
make: *** [tbclient.exe] Error 1


Thanks.

Nathan Ridge

unread,
Nov 8, 2009, 1:15:02 PM11/8/09
to wx-u...@googlegroups.com

<28e9bb09-eb2e-4bee...@c3g2000yqd.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

wx-config is a command which outputs the flags you need to pass
to the compiler/linker to build your wxWidgets program.
=20
To get your makefile to execute the command and pass the output
to g++ as opposed to just the command text=2C you need to add back-quotes
around the call to wx-config=2C as in:
=20
`wx-config --cxxflags`
=20
The back-quote character should be just to the left of the "1"
character on your keyboard.
=20
Regards=2C
Nathan. =20
_________________________________________________________________
Eligible CDN College & University students can upgrade to Windows 7 before =
Jan 3 for only $39.99. Upgrade now!
http://go.microsoft.com/?linkid=3D9691819=

Daniel

unread,
Nov 8, 2009, 1:46:44 PM11/8/09
to wx-users
I still get errors:

Daniel@DANSHOME ~/tb
$ make
g++ -Wall -g -o0 client.cpp player.cpp -o tbclient.exe -I C:
\wxWidgets-2.8.10
\include `wx-config --cxxflags`
/bin/sh: wx-config: command not found
In file included from client.cpp:7:
client.h:4:19: wx/wx.h: No such file or directory

Iulian-Nicu Șerbănoiu

unread,
Nov 8, 2009, 1:52:19 PM11/8/09
to wx-u...@googlegroups.com
Use "-I path_to_wx_headers" option if you don't have pkg-config
installed in your cygwin configuration.

HTH,

Iulian

Nathan Ridge

unread,
Nov 8, 2009, 2:02:04 PM11/8/09
to wx-u...@googlegroups.com

<c4a82325-d301-44ff...@h34g2000yqm.googlegroups.com>

Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

You did build the wxWidgets libraries=2C right?
=20
Assuming you did=2C wx-config should be located in the folder
where you built wxWidgets=2C usually something like
C:\wxWidgets-2.8.10\build-gcc\. You may need too specify
this absolute path when you're invoking wx-config=2C
or put this folder in your PATH environment variable
so that make can find it.
=20
Regards=2C
Nate.
=20
p.s. I apologize for the weird symbols that show up
at the end of lines. This just started happening
recently. Any idea how to fix it? =20

Daniel

unread,
Nov 8, 2009, 2:04:57 PM11/8/09
to wx-users
On 8 Nov, 18:52, Iulian-Nicu Șerbănoiu <undergra...@gmail.com> wrote:
> Use "-I path_to_wx_headers" option if you don't have pkg-config
> installed in your cygwin configuration.

How do I check?

Nathan Ridge

unread,
Nov 8, 2009, 2:20:12 PM11/8/09
to wx-u...@googlegroups.com

<742c13960911081052q477...@mail.gmail.com>

Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

> Use "-I path_to_wx_headers" option if you don't have pkg-config
> installed in your cygwin configuration.

Note that if you do it this way you will need to provide two paths:
=20
-I C:\wxWidgets-2.8.10\include
=20
and
=20
-I C:\wxWidgets-2.8.10\[build directory]\lib\wx\include
=20
or something similar.
=20
Regards=2C
Nate. =20
_________________________________________________________________
Windows Live: Friends get your Flickr=2C Yelp=2C and Digg updates when they=
e-mail you.
http://go.microsoft.com/?linkid=3D9691817=

Daniel

unread,
Nov 8, 2009, 4:15:57 PM11/8/09
to wx-users
How do I install pkg-config?
Reply all
Reply to author
Forward
0 new messages