[Bug bootstrap/12462] gcc-3.3.1 can't build shared library with libstdc++.a

info at yourkit dot com gcc-bugzilla@gcc.gnu.org
Wed Oct 6 12:05:00 GMT 2004


------- Additional Comments From info at yourkit dot com  2004-10-06 12:04 -------
But the problem is that I need to create shared library without references to
other shared libraries. To achieve this I'm statically linking necessary code
from libstdc++.a. It's possible to do and linker also allows this. Moreover
everything is working (compiling and linking) until I use <iostream>

For example, I can compile the following code:

#include <vector>

extern "C" {
  void Java_com_yourkit_hello_sayHello(){
     std::vector<int> v;
  }
}

and cannot compile

#include <vector>
#include <iostream> // the only difference

extern "C" {
  void Java_com_yourkit_hello_sayHello(){
     std::vector<int> v;
  }
}

It's strange, because I'm using nothing from <iostream>



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12462



More information about the Gcc-bugs mailing list