Re: c++11 question: clang++ 3.3 future header not found

2013-08-27 Thread Quark
list, please pardon
my stupid mail client hung, giving me impression that e-mail was not sent.
apologies for spam.


- Original Message -
 From: Quark unixuser2000-f...@yahoo.com
 To: freebsd-questions@freebsd.org freebsd-questions@freebsd.org
 Cc: 
 Sent: Tuesday, 27 August 2013 12:52 PM
 Subject: c++11 question: clang++ 3.3 future header not found
 
 % uname -a
 FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 
 2013 
     r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
 % clang++ --version
 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
 Target: x86_64-unknown-freebsd9.2
 Thread model: posix
 
 test program
 #include iostream
 #include future
 
 int main( int argc, char* argv[])
 {
         auto f = std::async( [] () {
                         std::cout  Hello, World!  
 std::endl;
                         });
         f.wait();
         return 0;
 }
 
 
 error received is
 % clang++ -otest test.cc
 
 test.cc:2:10: fatal error: 'future' file not found
 #include future
          ^
 1 error generated.
 
 I guess clang is re-using system headers which belong to older gcc 4.2
 I also have gcc48 installed, how can I make clang to refer gcc48 headers?
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: c++11 question: clang++ 3.3 future header not found

2013-08-27 Thread Tijl Coosemans
On Tue, 27 Aug 2013 15:22:49 +0800 (SGT) Quark wrote:
 % uname -a
 FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 
 2013     r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
 % clang++ --version
 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
 Target: x86_64-unknown-freebsd9.2
 Thread model: posix
 
 test program
 #include iostream
 #include future
 
 int main( int argc, char* argv[])
 {
         auto f = std::async( [] () {
                         std::cout  Hello, World!  std::endl;
                         });
         f.wait();
         return 0;
 }
 
 
 error received is
 % clang++ -otest test.cc
 
 test.cc:2:10: fatal error: 'future' file not found
 #include future
          ^
 1 error generated.
 
 I guess clang is re-using system headers which belong to older gcc 4.2
 I also have gcc48 installed, how can I make clang to refer gcc48 headers?

There two C++ runtime libraries, the old gcc libstdc++ which is used by
default and the new C++11 libc++.  You can use the latter like this:

clang++ -std=c++11 -stdlib=libc++ -otest test.cc


signature.asc
Description: PGP signature


Re: c++11 question: clang++ 3.3 future header not found

2013-08-27 Thread Quark




- Original Message -
 From: Tijl Coosemans t...@coosemans.org
 To: Quark unixuser2000-f...@yahoo.com
 Cc: freebsd-questions@freebsd.org freebsd-questions@freebsd.org
 Sent: Tuesday, 27 August 2013 1:41 PM
 Subject: Re: c++11 question: clang++ 3.3 future header not found
 
 On Tue, 27 Aug 2013 15:22:49 +0800 (SGT) Quark wrote:
  % uname -a
  FreeBSD cobalt 9.2-RC3 FreeBSD 9.2-RC3 #0 r254795: Sat Aug 24 20:25:04 UTC 
 2013     r...@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
  % clang++ --version
  FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
  Target: x86_64-unknown-freebsd9.2
  Thread model: posix
 
  test program
  #include iostream
  #include future
 
  int main( int argc, char* argv[])
  {
          auto f = std::async( [] () {
                          std::cout  Hello, World! 
  std::endl;
                          });
          f.wait();
          return 0;
  }
 
 
  error received is
  % clang++ -otest test.cc
 
  test.cc:2:10: fatal error: 'future' file not found
  #include future
           ^
  1 error generated.
 
  I guess clang is re-using system headers which belong to older gcc 4.2
  I also have gcc48 installed, how can I make clang to refer gcc48 headers?
 
 There two C++ runtime libraries, the old gcc libstdc++ which is used by
 default and the new C++11 libc++.  You can use the latter like this:
 
 clang++ -std=c++11 -stdlib=libc++ -otest test.cc
 

thanks, it worked.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org