[email protected] said:
> 
>         I'm working on a memory constrained system that currently doesn't have
>         (or need) this library.
> 
>         Is there a way to build 0mq such that I can distribute with less (or
>         no) libstdc++? More importantly, has anyone already tackled this? Any
>         pointers are greatly appreciated!
> 
> 
>     You may try to link with libstdc++ statically. As 0MQ uses only a subset 
> of
>     C++ functionality, you may end up with a smaller executable.
> 
> 
> Good idea Martin. So can I produce a shared library of 0mq that's statically
> linked to libstdc++? I realize this isn't really a 0mq question... any tips on
> where to look?

No idea if linking libstdc++ is supported in any way, but:

At least on Debian, the libstdc++6-4.3-dev package on my system installs a
libstdc++.a:

/usr/lib/gcc/i486-linux-gnu/4.3/libstdc++.a

You'd want to hack the 0MQ build to link directly against that .a file
instead of just using -lstdc++. I guess this involves passing -nostdlib to
g++ and listing all the runtime libraries manually.

Note that I assume you will not want to link such a libzmq.so with any C++
application since that will likely break in all sorts of horrible ways due
to conflicts between the different runtime libraries.

-mato
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to