开发者

How to statically link libstdc++

开发者 https://www.devze.com 2023-03-25 07:34 出处:网络
I am trying to get my program working in another machine where libstdc++ versions is different. I am developing and compiling it on netbeans. I have specified the option -static-libstdc++ but the prog

I am trying to get my program working in another machine where libstdc++ versions is different. I am developing and compiling it on netbeans. I have specified the option -static-libstdc++ but the program continues trying to load libstdc++.so.6 in the local machine.

How can I开发者_Python百科 get a fully static libstdc++ link?

Thanks.


Not sure of the exact circumstances here, but I ran into a similar problem just now with different versions of Mac OS X and gcc. I worked around it by copying the actual dylib I wanted into the same directory as the executable and changing DYLD_LIBRARY_PATH to have it search there first before /usr/lib.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号