libstdc++

IOS7 (only) stdlibc++ linking issue

雨燕双飞 提交于 2019-12-17 05:51:51
问题 I need help. I had a framwork which was using stdc++ like std:string. Now when i have created new app for IOS7 only there is problem with linking this framework because of problems with stdc++ lib: Undefined symbols for architecture armv7 "std::basic_string, std::allocator >::_Rep::_S_empty_rep_storage", referenced from ... I have find out something strange that when i change the Deplyment target to ios6 in this app all is working fine. With ios7 i see errors. I already have flag set in other

how to find libstdc++.so.6: that contain GLIBCXX_3.4.19 for RHEL 6?

只愿长相守 提交于 2019-12-13 15:24:49
问题 I work with a Linuxs server: > cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.7 (Santiago) (from wikipedia: Red Hat Enterprise Linux 6 was forked from Fedora 12 6.7, also termed Update 7, 22 July 2015 (kernel 2.6.32-573) 6.8, also termed Update 8, 10 May 2016 (kernel 2.6.32-642)) The kernel > uname -r 2.6.32-642.11.1.el6.x86_64 > uname -s Linux > uname -v #1 SMP Tue Nov 15 22:57:18 EST 2016 > cat /proc/version Linux version 2.6.32-642.11.1.el6.x86_64 (sandman@node3res7)

How to use alternate glibc with existing libstdc++?

ε祈祈猫儿з 提交于 2019-12-13 05:53:56
问题 I need to use a self-compiled version of glibc (2.18), newer than the default one on the system (2.15). I can compile&link a C++ program, but when I try to run it, I get errors about libstdc++.so.6 . (C programs seems to work just fine.) Do I need to recompile gcc against the newer glibc for this to work? Why? (Update: I figured this part out, but I have a few other questions at the bottom.) Here is a sample C++ program: #include <iostream> int main() { std::cout << "ok\n"; return 0; }

Seg fault when app & shared lib built with -static-libstdc++

痞子三分冷 提交于 2019-12-12 17:22:41
问题 If I build a C++ app with -static-libstdc++ which loads a shared lib (via dlopen) which was also built with -static-libstdc++ , then the app seg faults during dlopen. BUT--this only happens in some setups: GCC 4.7.4, 32-bit: pass GCC 4.8.3, 32-bit: pass GCC 4.8.4, 64-bit: pass GCC 4.9.2, 64-bit: pass GCC 4.9.3, 32-bit: FAIL (unless RTLD_DEEPBIND is specified) GCC 4.9.3, 64-bit: pass Findings: If -static-libstdc++ is not used when building for either the shared lib or the app, it works. If (

Compiling one shared library on Linux to target all distributions

爱⌒轻易说出口 提交于 2019-12-12 08:11:28
问题 We want to create one shared library (.so) to target all distributions, including old ones. The code is written in C++ and uses C++11 features, so the compiler must be at least gcc 4.7. We noticed that if we compile our code on a Linux machine with gcc 4.7.2 installed (e.g., Ubuntu 12.10) then the .so produced has “version 1 (GNU/Linux)” while on older os (e.g., CentOS 5.6) the version is “version 1 (SYSV)” – and libraries with the GNU/Linux newer version cannot be used on older os. So we

GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

你。 提交于 2019-12-12 07:49:19
问题 Apologies, I understand questions very similar to this have been asked relatively often, although none of the solutions seem to work for me.When attempting to run any c++ code of a reasonable complexity, I get the above error. The full error message is: /main: relocation error: ./main: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference running another project, I get a very similar error: ./main:

GCC compatibility of shared libraries with STL objects in their interface

偶尔善良 提交于 2019-12-12 07:45:15
问题 I have an application with STL objects used as part of the C++ interface for plug-in writers. I know the best option for compatibility would have been to use a C interface instead, but that's not currently feasible. I know that everything from GCC 3.4 to 4.8 in libstdc++ has been highly compatible in terms of ABI. So for example, if I compile with GCC 4.1, and a plug-in vendor writes code compiled with GCC 4.7, then barring corner cases all will be well on a platform with a libstdc++ version

Infinite loop in random.tcc (GCC 6.1.0) (May be bug in Armadillo)

痞子三分冷 提交于 2019-12-12 02:19:19
问题 I found the C++ 11 random number generator in GCC 6.1.0 causes codes stuck in Mac OS X 10.11.5, a simple code snippet is as following: #include <iostream> #include <armadillo> using namespace std; using namespace arma; int main(int argc, char const* argv[]) { cout << "check 1" << endl; cout << arma_rng::randn<double>() << endl; cout << "check 2" << endl; return 0; } I debugged this code by using lldb , and locked the suspicious part in random.tcc file of libstdc++ : /** * Polar method due to

How to point to the newer version of gcc libs when installing rpms

你。 提交于 2019-12-12 01:51:45
问题 I am trying to install Chrome on my Centos 6.4. The stock gcc is 4.4.6, so I installed 4.7.3 in /opt/gcc-4.7.3 myself. Also added /opt/gcc-4.7.3/bin to PATH and prepended /opt/gcc-4.7.3/lib64 to LD_LIBRARY_PATH where libstdc++.so.6 is located. However when I install chrome rpm, still got the same error: rpm -ivh google-chrome-stable_current_x86_64.rpm warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY error: Failed dependencies: libstdc++.so

std::stringstream strange behaviour

不想你离开。 提交于 2019-12-11 19:46:34
问题 Some background information, for a homework assignment I had to write a polish notation calculator using binary trees, for this to work I had to parse command line input so that it would properly build the binary tree and then go over it to give a valid answer to the mathematical expression that was entered. For the parsing I used a std::stringstream so that I would easily be able to convert the std::string I was handed into a valid float (or integer, double). The issue I ran across was the