您尚未登录。

楼主 #1 2019-07-31 09:38:21

chendong
会员
注册时间: 2019-07-22
已发帖子: 77
积分: 77

关于编译CPP 文件

最近在移植pjsip 工程,里面有些库是cpp的,好像make dep 就会报错误,看了一下有库是cpp 文件,这个怎么设置编译路径。我装的工具链是gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf。多谢。

离线

#2 2019-07-31 09:44:22

超级萌新
会员
注册时间: 2018-05-04
已发帖子: 408
积分: 407

Re: 关于编译CPP 文件

什么错误

离线

楼主 #3 2019-07-31 10:08:59

chendong
会员
注册时间: 2019-07-22
已发帖子: 77
积分: 77

Re: 关于编译CPP 文件

超级萌新 说:

什么错误

make[2]: Leaving directory `/home/sinlinx/SIN-V3s/pjsip/pjproject-2.8/pjsip/build'
make -f /home/sinlinx/SIN-V3s/pjsip/pjproject-2.8/build/rules.mak APP=PJSUA2_LIB app=pjsua2-lib depend
make[2]: Entering directory `/home/sinlinx/SIN-V3s/pjsip/pjproject-2.8/pjsip/build'
.pjsua2-lib-arm-unknown-linux-gnueabihf.depend:1: *** missing separator.  Stop.
make[2]: Leaving directory `/home/sinlinx/SIN-V3s/pjsip/pjproject-2.8/pjsip/build'
make[1]: *** [depend] Error 2

这个里面全是CPP 文件。而且我编了一个简单的cpp文件,arm-linux-gnueabihf-g++ -W -o hello-cpp hello-c++.cpp,显示没有arm-linux-gnueabihf-g++编译器。编译c是没有问题的。

离线

#4 2019-07-31 10:50:54

超级萌新
会员
注册时间: 2018-05-04
已发帖子: 408
积分: 407

Re: 关于编译CPP 文件

没有 arm-linux-gnueabihf-g++ 这个吗?

离线

楼主 #5 2019-07-31 11:03:19

chendong
会员
注册时间: 2019-07-22
已发帖子: 77
积分: 77

Re: 关于编译CPP 文件

超级萌新 说:

没有 arm-linux-gnueabihf-g++ 这个吗?

这显示有啊。
arm-linux-gnueabihf-g++ -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=/opt/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/../libexec/gcc/arm-linux-gnueabihf/6.3.1/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: /home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/snapshots/gcc-linaro-6.3-2017.02/configure SHELL=/bin/bash --with-mpc=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-objc-gc --enable-shared --without-included-gettext --enable-nls --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --with-float=hard --with-mode=thumb --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --with-build-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/sysroots/arm-linux-gnueabihf --with-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/libc --enable-checking=release --disable-bootstrap --enable-languages=c,c++,fortran,lto --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf --prefix=/home/tcwg-buildslave/workspace/tcwg-make-release/label/docker-trusty-amd64-tcwg-build/target/arm-linux-gnueabihf/_build/builds/destdir/x86_64-unknown-linux-gnu
Thread model: posix
gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02)

离线

楼主 #6 2019-07-31 13:56:32

chendong
会员
注册时间: 2019-07-22
已发帖子: 77
积分: 77

Re: 关于编译CPP 文件

大家谁有碰到这事。谢谢。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn