C++11 mode

172 views
Skip to first unread message

Igor Korot

unread,
Apr 4, 2016, 7:36:39 AM4/4/16
to wx-u...@googlegroups.com
Hi,

igor@IgorDellGentoo ~/wxWidgets/testbuild $ ../configure
CXXFLAGS="-std=c++11 -stdlib=libc++" --with-cxx=11 --with-gtk=2
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for toolkit... gtk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the Intel C compiler... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... yes
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
configure: error: C++ compiler is needed to build wxWidgets


igor@IgorDellGentoo ~/wxWidgets/testbuild $ ../configure
CXXFLAGS="-std=c++11 -stdlib=libc++" LDFLAGS="-std=c++11
-stdlib=libc++"--with-cxx=11 --with-gtk=2
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for toolkit... gtk
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/igor/wxWidgets/testbuild':
configure: error: C compiler cannot create executables
See `config.log' for more details


igor@IgorDellGentoo ~/wxWidgets/testbuild $ gcc --version
gcc (Gentoo 4.8.4 p1.6, pie-0.6.1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


This is my first time compiling anything in C++11 mode. And I'm sure
I'm missing something obvious.

Could someone please help?

Thank you.

Vadim Zeitlin

unread,
Apr 4, 2016, 9:14:08 AM4/4/16
to wx-u...@googlegroups.com
On Mon, 4 Apr 2016 07:36:37 -0400 Igor Korot wrote:

IK> igor@IgorDellGentoo ~/wxWidgets/testbuild $ ../configure
IK> CXXFLAGS="-std=c++11 -stdlib=libc++"

You can't use libc++ with gcc under Linux. Also, the whole point of
--with-cxx=11 is that you don't need to put -std=c++11 in CXXFLAGS with it.

IK> configure: error: C compiler cannot create executables
IK> See `config.log' for more details

And if you did what's written above, you would have been probably able to
find it yourself.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Reply all
Reply to author
Forward
0 new messages