默认用qtcreator5.2.0创建了一个quick项目,却报如下错误:
error:cstdlib.h no such file or directory
解决方法:
打开项目文件untitled4.pro,加上INCLUDEPATH = d:/Soft/cygwin/usr/local/android-ndk-r10/platforms/android-L/arch-arm/usr/include/
如果报找不到crtbegin_so.o,可以加上QMAKE_LFLAGS += -nostdlib
如果报什么z m dl什么的加上LIBS += -Ld:/Soft/cygwin/usr/local/android-ndk-r10/platforms/android-L/arch-arm/usr/lib/ -lz -ldl -lm
# DEFINES += -DANDROID
QMAKE_LFLAGS += -nostdlib
# QMAKE_CXXFLAGS +=
# QMAKE_LFLAGS_DEBUG +=
# QMAKE_LFLAGS_RELEASE +=
# QMAKE_CFLAGS_DEBUG +=
# QMAKE_CFLAGS_RELEASE +=
INCLUDEPATH = d:/Soft/cygwin/usr/local/android-ndk-r10/platforms/android-L/arch-arm/usr/include/
LIBS += -Ld:/Soft/cygwin/usr/local/android-ndk-r10/platforms/android-L/arch-arm/usr/lib/ -lz -ldl -lm
时间: 2024-11-10 23:08:01