在我的新项目中,我需要基于交流编写的项目.而且我知道我可以使用NDK来完成它,但这里有一个问题:如何将标准重写Makefile为Android.mk?而且,在Android中,我可以忽略ndk,使用jni直接构建项目来使c项目适应android项目吗?还有想法让c项目适应android项目吗?谢谢.最后,这是Makefile:
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in …Run Code Online (Sandbox Code Playgroud) 我使用android build-gcc.sh脚本与gcc一起编译了gdc,并在build/core/definitions.mk中包含了一个新的存根来处理D语言文件,作为构建过程的一部分.我知道事情正在编译好,但我的问题是链接:
当我构建项目时,我收到此错误:
ld: crtbegin_so.o: No such file: No such file or directory
Run Code Online (Sandbox Code Playgroud)
对于常规的仅限c的项目也是如此.现在我在构建目录中运行了一个快速查找,发现文件(crtbegin_so.o)确实存在于我编译gcc时指定的sysroot中(或者更确切地说,当build-gcc.sh构建它时).
有什么东西我可以寻找找到这个问题的解决方案?
在本地复制文件并直接链接到它们是一个不错的解决方案吗?
为什么ld(或collect2)会尝试将这些包含在gdc(D语言)链接中?