Hi Sean, Thanks for fast response! clang++ -std=c++11 -I/usr/local/include/ ../create.cpp -L/usr/local/lib -lsz -lz -ldl -lm -lhdf5 -lhdf5_cpp -lhdf5_hl -lhdf5_hl_cpp
works well, but it links with an old libc (since in fact there are no c++11 features used). The libc++ manual at http://libcxx.llvm.org/ says to use both. Once I put something like #include <memory> std::unique_ptr a1; into create.cpp the compilation without "--stdlib=libc++" breaks and says ../create.cpp:34:6: error: no type named 'unique_ptr' in namespace 'std' std::unique_ptr<int> a1; ~~~~~^ ../create.cpp:34:16: error: expected unqualified-id std::unique_ptr<int> a1; Andrey. On Jul 29, 2013, at 4:48 PM, "Sean McBride" <[email protected]> wrote: > On Mon, 29 Jul 2013 15:31:33 +0200, Andrey Antipov said: > >> Everything goes smoothly, when no c++11 is required - that is >> >> clang++ -I/usr/local/include/ ../create.cpp -L/usr/local/lib -lsz -lz - >> ldl -lm -lhdf5 -lhdf5_cpp -lhdf5_hl -lhdf5_hl_cpp >> >> Once I now want to switch the c++11 support of clang I run >> >> clang++ -std=c++11 -stdlib=libc++ -I/usr/local/include/ ../create.cpp -L/ >> usr/local/lib -lsz -lz -ldl -lm -lhdf5 -lhdf5_cpp -lhdf5_hl -lhdf5_hl_cpp > > Here you are changing two things at once: -std=c++11 -stdlib=libc++. What if > you build as C++11 but don't specify libc++? > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng [email protected] > Rogue Research www.rogue-research.com > Mac Software Developer Montréal, Québec, Canada On Jul 29, 2013, at 4:48 PM, "Sean McBride" <[email protected]> wrote: > On Mon, 29 Jul 2013 15:31:33 +0200, Andrey Antipov said: > >> Everything goes smoothly, when no c++11 is required - that is >> >> clang++ -I/usr/local/include/ ../create.cpp -L/usr/local/lib -lsz -lz - >> ldl -lm -lhdf5 -lhdf5_cpp -lhdf5_hl -lhdf5_hl_cpp >> >> Once I now want to switch the c++11 support of clang I run >> >> clang++ -std=c++11 -stdlib=libc++ -I/usr/local/include/ ../create.cpp -L/ >> usr/local/lib -lsz -lz -ldl -lm -lhdf5 -lhdf5_cpp -lhdf5_hl -lhdf5_hl_cpp > > Here you are changing two things at once: -std=c++11 -stdlib=libc++. What if > you build as C++11 but don't specify libc++? > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng [email protected] > Rogue Research www.rogue-research.com > Mac Software Developer Montréal, Québec, Canada > >
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
