libstdc++

Wrong GLIBCXX version when running a program that was compiled on the same machine

别来无恙 提交于 2019-12-02 09:44:30
How is it possible that a program that I compile, link and run on the same machine to have GLIBCXX version errors when I try to run it? Does anyone know? Here is the error I am getting: 0.01s$ build/test/gamgee_test build/test/gamgee_test: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by build/test/gamgee_test) build/test/gamgee_test: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by build/test/gamgee_test) full output (with VERBOSE=1) including building and running is here: https://travis-ci.org/broadinstitute

How to get location of needed runtime libraries for msvc

别说谁变了你拦得住时间么 提交于 2019-12-02 08:58:24
I have custom wrapper over CMake, which perform configuring, compilation, and creating distrib for various platforms (win32, SunOS and so on) and different compilers. I need to put into distrib all needed runtime libraries (libgcc_s.so, libstdc++.so for *nix like OS. msvcr90.dll, msvcp100.dll for win32). For example, gcc has mechanism, which allows to get full names of these libraries: # get location of libgcc_s of default compiler bash-3.2$ g++ -print-file-name=libgcc_s.so /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../libgcc_s.so # get location of libstdc++ of custom compiler bash-3

very basic regex scenario works different than my expectation on libstdc++-v3

吃可爱长大的小学妹 提交于 2019-12-02 05:52:28
I'm getting a different behavior than my expectation (and also different than Microsoft C++). Consider the following test.cpp file: #include <iostream> #include <ostream> #include <regex> int main( void ) { std::regex rx( "a(b+)(c+)d" ); std::string s( "abbbbccd" ); std::smatch m; bool f = regex_match( s, m, rx ); std::cout << std::boolalpha << f << std::endl; if( f ) { std::cout << "m[1]=" << m[1] << std::endl; std::cout << "m[2]=" << m[2] << std::endl; } return 0; } On my Ubuntu Oneiric box, note how I compile the program, and note the output I'm getting from a.out: $ g++ -std=c++0x test.cpp

Any improvements on the GCC/Windows DLLs/C++ STL front?

旧巷老猫 提交于 2019-12-02 04:33:23
问题 Yesterday, I got bit by a rather annoying crash when using DLLs compiled with GCC under Cygwin. Basically, as soon as you run with a debugger, you may end up landing in a debugging trap caused by RtlFreeHeap() receiving an address to something it did not allocate. This is a known bug with GCC 3.4 on Cygwin. The situation arises because the libstdc++ library includes a "clever" optimization for empty strings. I spare you the details (see the references throughout this post), but whenever you

Any improvements on the GCC/Windows DLLs/C++ STL front?

北战南征 提交于 2019-12-02 00:58:53
Yesterday, I got bit by a rather annoying crash when using DLLs compiled with GCC under Cygwin. Basically, as soon as you run with a debugger, you may end up landing in a debugging trap caused by RtlFreeHeap() receiving an address to something it did not allocate. This is a known bug with GCC 3.4 on Cygwin. The situation arises because the libstdc++ library includes a "clever" optimization for empty strings. I spare you the details (see the references throughout this post), but whenever you allocate memory in one DLL for an std::string object that "belongs" to another DLL, you end up giving

Unable to run an application compiled on OS-X Snow Leopard (10.6.7) on another Mac using OS-X Leopard (10.5.8). libstdc++.6.dylib error returned

余生颓废 提交于 2019-12-01 20:29:01
问题 I'm trying to port a C++ project using C++0x and Ogre on Max OS-X and I encounter a portability problem between OS-X versions. I succeeded in compiling my project on Mac OS-X 10.6 (Snow Leopard) using GCC 4.6.0 (because I needed C++0x). It was hard (probably because I a new OSX user) but it finally compiled it without error. I included all the required Components, Frameworks, Plugins etc. needed into the Application.app bundle and it does start fine on this Mac OS-X 10.6 But when I transfer

Mixing stdc++ and libc++ in an iOS project

落花浮王杯 提交于 2019-12-01 19:12:42
I am having a difficult time configuring an iOS project which uses a static library linked against the old libstdc++ that gcc used. That library is 32 and 64-bit. There are 6 libraries (libssl.a for example) that are 32-bit and must be updated. If I compile those libraries from source, they will be automatically linked with libc++, which will result in my linker complaining. Therefore, here are my questions: 1) Is there any way to have a single static library inside the project use libstdc++, and have the others use libc++? 2) How can I compile libraries from source (like libcrypto and libssh)

Unable to run an application compiled on OS-X Snow Leopard (10.6.7) on another Mac using OS-X Leopard (10.5.8). libstdc++.6.dylib error returned

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 18:55:15
I'm trying to port a C++ project using C++0x and Ogre on Max OS-X and I encounter a portability problem between OS-X versions. I succeeded in compiling my project on Mac OS-X 10.6 (Snow Leopard) using GCC 4.6.0 (because I needed C++0x). It was hard (probably because I a new OSX user) but it finally compiled it without error. I included all the required Components, Frameworks, Plugins etc. needed into the Application.app bundle and it does start fine on this Mac OS-X 10.6 But when I transfer the project on my old laptop installed with Mac OS-X 10.5.8 I'm unable to run the application. If I

Does the standard mandate enable_shared_from_this is to be inherited publicly? Why?

半城伤御伤魂 提交于 2019-12-01 17:46:31
It's common to inherit from enable_shared_from_this just to be able to return shared_ptr 's from member functions as the primary intention, with no intention of exposing enable_shared_from_this API in the derived class. Since to make use of enable_shared_from_this one must do so through public inheritance (does the standard mandates this? what's the rationale?), this can't be achieved and enable_shared_from_this API is forced into derived class public API. Inherenting enable_shared_from_this privately and making shared_ptr a friend class do work on clang coupled with libc++, but doesn't work

Spurious copies in c++03 libstdc++ vs c++11

为君一笑 提交于 2019-12-01 17:34:08
Consider this code: #include <iostream> #include <string> #include <map> using namespace std; class Foo { public: Foo() : _x(0) { cout << "Default" << endl; } Foo(int a) : _x(a) { cout << "Param" << endl; } Foo(Foo const &foo) : _x(foo._x) { cout << "Copy" << endl; } Foo& operator=(Foo const &foo) { cout << "Assignment" << endl; _x = foo._x; return *this; } int get(void) { return _x; } private: int _x; }; int main(int argc, char *argv []) { std::map<int, Foo> foos; Foo a_foo(10); foos[100] = a_foo; return 0; } Compiled in gcc with -std=c++11 and you get the output, Param Default Assignment