libstdc++

What configure options were used when building gcc / libstdc++?

微笑、不失礼 提交于 2019-12-18 12:07:30
问题 After reading about the problem of passing empty std::string objects between DLLs and EXEs, I am concerned about the configure options used to build my gcc / libstdc++. More specific I want to know if --enable-fully-dynamic-string was used during ./configure . I'm using MinGW 4.4.0 on Windows XP. Does anybody know the configuration used to build this release? Is there a general way to find this information for any installation of GNU gcc? The gcc manual gives me no hint on this topic. Thanks

How do I compile boost for OS X 64b platforms with stdlibc++?

帅比萌擦擦* 提交于 2019-12-18 12:07:06
问题 I would like to compile boost for Mac OS X 10.9, with stdlibc++. I run the following command: ./b2 threading=multi link=static runtime-link=static cxxflags="-stdlib=libstdc++" linkflags="-stdlib=libstdc++" The build completes successfully; however, my application build fails at linkage time, when it can't find symbols suck as std::__1::locale::use_facet, std::__1::basic_string etc. The pertinent detail there is the __1, I believe. My question is, how do I compile boost for OSX 64b platforms

Debug through libstdc++

孤街醉人 提交于 2019-12-18 04:46:08
问题 I'm using gcc on GNU/Linux and the debug-files and headers of libc and libstd++ are installed. But I don't know how to tell gdb to use the source-code of them, especially to debug into libstd++. The source-code of libstdc++ itself seems to be provided in a complicated structure. I think the directory command is the right choice. I'm using here Debian/Ubuntu and downloaded the source with apt-get source libstdc++6 into my home-directory. I'm pretty sure I didn't need take special steps for

Does C++11 require allocators to be default constructible, libstdc++ and libc++ disagree?

半腔热情 提交于 2019-12-18 02:44:06
问题 Using a slightly modified version of Howard Hinnants's C++11 stack allocator which is documented here and here, with std::basic_string and compiling with gcc which is using libstdc++ , the following example ( see it live ): const unsigned int N = 200; arena<N> a; short_alloc<char, N> ac(a) ; std::basic_string<char,std::char_traits<char>,short_alloc<char, N>> empty(ac); gives the following error( amongst others ): error: no matching function for call to 'short_alloc<char, 200ul>::short_alloc()

Discrepancy between istream's operator>> (double& val) between libc++ and libstdc++

对着背影说爱祢 提交于 2019-12-17 22:01:08
问题 With my recent upgrade to Mac OS X 10.9 the default standard C++ library changed from libstdc++ to libc++. Since then I observe unexpected behaviour of the stringstream operator>>(double) documented in the code example below. In summary the libc++ seems to have problems with extracting double values from stringstreams when the double value is followed by a letter. I already checked the standard (2003) but I can't find any specific information if extraction should work in this case or not. So

Android SDK - aapt error : libstdc++.so.6 cannot open shared object file

旧时模样 提交于 2019-12-17 17:39:23
问题 I was creating a new project out of nothing, for testing purpose, leaving all parameter to default (I didn't made any code change), on a new ADT installation (Ubuntu Gnome 14.04 LTS, x86_64 CPU), but I have the following error in the Eclipse Console : [2014-06-11 09:03:10 - Kronos] /home/erwan/Applications/ADT/adt-bundle-linux-x86_64-20140321/sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory Here is

How to edit and re-build the GCC libstdc++ C++ standard library source?

邮差的信 提交于 2019-12-17 16:37:58
问题 I am working on some research and would like to edit some of the source code in the libstdc++ library for experimentation. I am, specifically, interested in experimenting with the parallel sorting algorithms. Is there a place I can find documentation to easily edit and build the source code? I have tried, unsuccessfully, to build various versions of the libstdc++ library. It seems like most new versions require building the entire gcc package, which is a much more lengthy process, especially

Valgrind Unrecognised instruction

拥有回忆 提交于 2019-12-17 16:32:08
问题 I have the following code: #include <iostream> #include <random> int main() { std::mt19937_64 rng(std::random_device{}()); std::cout << std::uniform_int_distribution<>(0, 100)(rng) << '\n'; } I try to profile it using valgrind , but it says: vex amd64->IR: unhandled instruction bytes: 0xF 0xC7 0xF0 0x89 0x6 0xF 0x42 0xC1 vex amd64->IR: REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0 vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F vex amd64->IR: PFX.66=0 PFX.F2=0 PFX.F3=0 ==2092== valgrind:

Where does the __1 symbol come from when using LLVM's libc++?

前提是你 提交于 2019-12-17 11:51:30
问题 I see a fair amount of questions like Apple Mach-O Linker (Id) Error and Undefined symbols in cryptopp at IOS 64-bit project. The problem is usually described as: Undefined symbols for architecture i386: "std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from: cv::gpu::error(char const*, char const*, int, char const*) in opencv2(gpumat.o) The problem often reduces to mixing/matching -stdlib=libc++ (LLVM C++ runtime) and -stdlib=libstdc++ (GNU C++ runtime). The

Why does libc++'s implementation of std::string take up 3x memory as libstdc++?

久未见 提交于 2019-12-17 07:26:21
问题 Consider the following test program: #include <iostream> #include <string> #include <vector> int main() { std::cout << sizeof(std::string("hi")) << " "; std::string a[10]; std::cout << sizeof(a) << " "; std::vector<std::string> v(10); std::cout << sizeof(v) + sizeof(std::string) * v.capacity() << "\n"; } Output for libstdc++ and libc++ respectively are: 8 80 104 24 240 264 As you can see, libc++ takes 3 times as much memory for a simple program. How does the implementation differ that causes