[英]cross compiling + cygwin + raspberry pi
I am following this tutorial: http://www.a2p.it/wordpress/tech-stuff/development/remote-debugging-raspberrypi/ 我正在关注本教程: http : //www.a2p.it/wordpress/tech-stuff/development/remote-debugging-raspberrypi/
to attempt to cross-compile some c++ code, but getting the following error: 尝试交叉编译某些c ++代码,但出现以下错误:
19:36:00 **** Incremental Build of configuration Debug for project test ****
make all
Building file: ../src/test.cpp
Invoking: Cygwin C++ Compiler
arm-unknown-linux-gnueabi-g++ -IC:\Dev\cygwin64\opt\cross\x-tools\arm-unknown-linux-gnueabi\arm-unknown-linux-gnueabi\sysroot\usr\include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/test.d" -MT"src/test.d" -o "src/test.o" "../src/test.cpp"
src/subdir.mk:18: recipe for target 'src/test.o' failed
make: *** [src/test.o] Error 127
19:36:01 Build Finished (took 120ms)
I am using 64-bit cygwin, 64-bit Eclipse and gnueabi-hardfp found here: https://github.com/IanLinsdell/Raspberrypi 我正在使用64位cygwin,64位Eclipse和gnueabi-hardfp在这里找到: https : //github.com/IanLinsdell/Raspberrypi
Does anyone know what this error means? 有人知道这个错误是什么意思吗?
Building target: libtest
Invoking: Cross G++ Linker
arm-unknown-linux-gnueabi-g++ -L"C:\Dev\cygwin\opt\cross\x-tools\sysroot\usr\lib" -shared -o "libtest" ./src/test.o
/opt/cross/x-tools/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.6.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
/opt/cross/x-tools/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.6.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find -lstdc++
/opt/cross/x-tools/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.6.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find -lgcc_s
/opt/cross/x-tools/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.6.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find /lib/libc.so.6
/opt/cross/x-tools/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.6.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find /usr/lib/libc_nonshared.a
/opt/cross/x-tools/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.6.3/../../../../arm-unknown-linux-gnueabi/bin/ld: cannot find /lib/ld-linux.so.3
collect2: ld returned 1 exit status
makefile:45: recipe for target 'libtest' failed
make: *** [libtest] Error 1
I see all the files above in the directory C:\\Dev\\cygwin\\opt\\cross\\x-tools\\sysroot\\usr\\lib. 我在目录C:\\ Dev \\ cygwin \\ opt \\ cross \\ x-tools \\ sysroot \\ usr \\ lib中看到以上所有文件。 I've added that path in the G++ Linker Lib path setting and i've even added it to the Cross Compiler PATH.
我在G ++ Linker Lib路径设置中添加了该路径,甚至将其添加到Cross Compiler PATH中。 what gives?
是什么赋予了?
Cygwin usually maps your local drive with /cygdrive/c/ instead of c:\\ so this will probably help your -L directive which specifies the library search path Cygwin通常使用/ cygdrive / c /而不是c:\\映射本地驱动器,因此这可能会有助于-L指令,该指令指定库搜索路径
Also Unix systems use forward slashes / instead so your compile line should look like this : arm-unknown-linux-gnueabi-g++ -L"/cygdrive/c/Dev/cygwin\\opt/cross/x-tools/sysroot/usr/lib" -shared -o "libtest" ./src/test.o
另外,Unix系统使用正斜杠/代替,因此您的编译行应如下所示:
arm-unknown-linux-gnueabi-g++ -L"/cygdrive/c/Dev/cygwin\\opt/cross/x-tools/sysroot/usr/lib" -shared -o "libtest" ./src/test.o
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.