library not found for -libstdc++.6.0.9

转载自: https://www.jianshu.com/p/35d34828e607

 

https://github.com/devdawei/libstdc-

 

libstdc++

Xcode10中删除的libstdc++

先下载下来这个项目,然后打开终端cdlibstdc--master文件夹,最后将install.sh拖到终端中执行即可。

 

 

 

报错原因

Xcode升级到Xcode10.0后,由于去掉陈旧的libstdc++库替换为libc++,libc++相对是苹果最新版的C++库,经过优化并全面支持C++11

解决办法

下载libstdc++库,下载链接,提取码arms
将 libstdc++、libstdc++.6、libstdc++6.0.9拷贝到Xcode的如下目录:
1.真机环境:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
2.模拟器环境:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/

拓展分析

拓展分析:出现原因主要是有时候第三方库中引用了libstdc++,但是Xcode10缺失改库,上面解决办法是治标之法,治本之法可以关注第三方库相关公告,一般第三方库会适配相应的Xcode版本,及时更新即可。



作者:Niuszeng
链接:https://www.jianshu.com/p/35d34828e607
来源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

展开阅读全文

*** Working zlib library and headers not found ***

04-15

在windows 下用msys+mingw编译glib源码, ./configure后出现如下信息rn$ ./configurernchecking for a BSD-compatible install... /bin/install -crnchecking whether build environment is sane... yesrnchecking for a thread-safe mkdir -p... /bin/mkdir -prn...rnchecking for ZLIB... norn...rnchecking for inflate in -lz... nornconfigure: error: *** Working zlib library and headers not found ***rnrn报的error应该是zlib库没有找rn然后我就下载了zlib的源码 zlib-1.2.3.tar.gz http://cdnetworks-kr-2.dl.sourceforge.net/project/libpng/zlib/1.2.3/zlib-1.2.3.tar.gzrn解压后把win32目录下的Makefile.gcc 复制到父目录中rn编译 rn ./configure 正常rnmake -f Makefile.gcc 正常rnls如下:rnAdministrator@20120104-2028 /d/zlibrn$ lsrnChangeLog configure gzio.o libzdll.a uncompr.ornFAQ contrib infback.c make_vms.com win32rnINDEX crc32.c infback.o minigzip.c zconf.hrnMakefile crc32.h inffast.c minigzip.exe zconf.in.hrnMakefile.gcc crc32.o inffast.h minigzip.o zlib.3rnMakefile.in deflate.c inffast.o minigzip_d.exe zlib.hrnREADME deflate.h inffixed.h msdos zlib1.dllrnadler32.c deflate.o inflate.c old zlibrc.ornadler32.o example.c inflate.h projects ztest2080.exernalgorithm.txt example.exe inflate.o qnx zutil.crnamiga example.o inftrees.c trees.c zutil.hrnas400 example_d.exe inftrees.h trees.h zutil.orncompress.c examples inftrees.o trees.orncompress.o gzio.c libz.a uncompr.crnrnrn然后我再到glib目录里去编译glib还是报*** Working zlib library and headers not found ***rn怎么才能在不改glib的 Makefile去编译呢 rn我还尝试了如下几个方法rn把zlib目录里的*.h 和*.dll *.exe *.a复制到了system32里 相应的也复制到了mingw include 和lib 里rn都不能解决rnrn为什么非得在Windows 里编译呢,,主要是我的笔记本一装Linux 就会被热的死机,AMD+ATI本本的悲哀 论坛

使用ndk 运行的时候library not found

04-13

我根据网上的方法配制好了eclipse然后也生成了so文件rn我运行的是NDK的hello-jni的例子rn打包后打开那个apk 里面也有so文件 打包进去的是libhello-jni.sorn代码我也进行了修改 改成了rnstatic rn System.loadLibrary("libhello-jni.so");rn 把"hello-jni.lib"加上了 "lib"rnrn但是用模拟器运行的时候就崩溃了 那个例子使用的SDK是2.2的rn有谁遇到过这个问题啊?帮帮忙 谢谢了rn我是在windows7平台下开发。rnrn错误日志rn04-13 02:41:43.662: ERROR/Zygote(33): setreuid() failed. errno: 2rn04-13 02:41:51.282: ERROR/Zygote(33): setreuid() failed. errno: 17rn04-13 02:41:52.522: ERROR/BatteryService(59): usbOnlinePath not foundrn04-13 02:41:52.522: ERROR/BatteryService(59): batteryVoltagePath not foundrn04-13 02:41:52.522: ERROR/BatteryService(59): batteryTemperaturePath not foundrn04-13 02:41:52.542: ERROR/SurfaceFlinger(59): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wakern04-13 02:41:59.422: ERROR/EventHub(59): could not get driver version for /dev/input/mouse0, Not a typewriterrn04-13 02:41:59.422: ERROR/EventHub(59): could not get driver version for /dev/input/mice, Not a typewriterrn04-13 02:41:59.692: ERROR/System(59): Failure starting core servicern04-13 02:41:59.692: ERROR/System(59): java.lang.SecurityExceptionrn04-13 02:41:59.692: ERROR/System(59): at android.os.BinderProxy.transact(Native Method)rn04-13 02:41:59.692: ERROR/System(59): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)rn04-13 02:41:59.692: ERROR/System(59): at android.os.ServiceManager.addService(ServiceManager.java:72)rn04-13 02:41:59.692: ERROR/System(59): at com.android.server.ServerThread.run(SystemServer.java:184)rn04-13 02:42:00.562: ERROR/SoundPool(59): error loading /system/media/audio/ui/Effect_Tick.oggrn04-13 02:42:00.572: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressStandard.oggrn04-13 02:42:00.572: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressSpacebar.oggrn04-13 02:42:00.572: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressDelete.oggrn04-13 02:42:00.572: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressReturn.oggrn04-13 02:42:03.413: ERROR/ThrottleService(59): Could not open GPS configuration file /etc/gps.confrn04-13 02:42:04.922: ERROR/logwrapper(144): executing /system/bin/tc failed: No such file or directoryrn04-13 02:42:05.022: ERROR/logwrapper(145): executing /system/bin/tc failed: No such file or directoryrn04-13 02:42:05.042: ERROR/logwrapper(146): executing /system/bin/tc failed: No such file or directoryrn04-13 02:42:20.249: ERROR/HierarchicalStateMachine(59): TetherMaster - unhandledMessage: msg.what=3rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): FATAL EXCEPTION: mainrn04-13 03:23:34.869: ERROR/AndroidRuntime(276): java.lang.ExceptionInInitializerErrorrn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at java.lang.Class.newInstanceImpl(Native Method)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at java.lang.Class.newInstance(Class.java:1429)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at android.app.ActivityThread.access$2300(ActivityThread.java:125)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at android.os.Handler.dispatchMessage(Handler.java:99)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at android.os.Looper.loop(Looper.java:123)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at android.app.ActivityThread.main(ActivityThread.java:4627)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at java.lang.reflect.Method.invokeNative(Native Method)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at java.lang.reflect.Method.invoke(Method.java:521)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at dalvik.system.NativeStart.main(Native Method)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): Caused by: java.lang.UnsatisfiedLinkError: Library libhello-jni not foundrn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at java.lang.Runtime.loadLibrary(Runtime.java:461)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at java.lang.System.loadLibrary(System.java:557)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): at com.example.hellojni.HelloJni.(HelloJni.java:64)rn04-13 03:23:34.869: ERROR/AndroidRuntime(276): ... 15 morern04-13 04:55:16.259: ERROR/AndroidRuntime(306): FATAL EXCEPTION: mainrn04-13 04:55:16.259: ERROR/AndroidRuntime(306): java.lang.ExceptionInInitializerErrorrn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at java.lang.Class.newInstanceImpl(Native Method)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at java.lang.Class.newInstance(Class.java:1429)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at android.app.ActivityThread.access$2300(ActivityThread.java:125)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at android.os.Handler.dispatchMessage(Handler.java:99)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at android.os.Looper.loop(Looper.java:123)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at android.app.ActivityThread.main(ActivityThread.java:4627)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at java.lang.reflect.Method.invokeNative(Native Method)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at java.lang.reflect.Method.invoke(Method.java:521)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at dalvik.system.NativeStart.main(Native Method)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): Caused by: java.lang.UnsatisfiedLinkError: Library ./lib/armeabi/libhello-jni not foundrn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at java.lang.Runtime.loadLibrary(Runtime.java:461)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at java.lang.System.loadLibrary(System.java:557)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): at com.example.hellojni.HelloJni.(HelloJni.java:64)rn04-13 04:55:16.259: ERROR/AndroidRuntime(306): ... 15 morern04-13 04:57:39.959: ERROR/AndroidRuntime(338): FATAL EXCEPTION: mainrn04-13 04:57:39.959: ERROR/AndroidRuntime(338): java.lang.ExceptionInInitializerErrorrn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at java.lang.Class.newInstanceImpl(Native Method)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at java.lang.Class.newInstance(Class.java:1429)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at android.app.ActivityThread.access$2300(ActivityThread.java:125)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at android.os.Handler.dispatchMessage(Handler.java:99)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at android.os.Looper.loop(Looper.java:123)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at android.app.ActivityThread.main(ActivityThread.java:4627)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at java.lang.reflect.Method.invokeNative(Native Method)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at java.lang.reflect.Method.invoke(Method.java:521)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at dalvik.system.NativeStart.main(Native Method)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): Caused by: java.lang.UnsatisfiedLinkError: Library ./lib/armeabi/libhello-jni.so not foundrn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at java.lang.Runtime.loadLibrary(Runtime.java:461)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at java.lang.System.loadLibrary(System.java:557)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): at com.example.hellojni.HelloJni.(HelloJni.java:64)rn04-13 04:57:39.959: ERROR/AndroidRuntime(338): ... 15 morern 论坛

没有更多推荐了,返回首页