mars icon indicating copy to clipboard operation
mars copied to clipboard

Mars怎么支持linux下运行?

Open landuochong opened this issue 3 years ago • 2 comments

如果把mars的代码在linux下编译,然后用qt写了个项目,去链接mars的库生成动态库给app模块用,发现可以生成的动态库,但是app链接的时候报错。 /usr/bin/ld: Sample/libRtm.so: undefined reference to xlogger_pid' /usr/bin/ld: Sample/libRtm.so: undefined reference to mars::comm::getCurWifiInfo(mars::comm::WifiInfo&, bool)' /usr/bin/ld: Sample/libRtm.so: undefined reference to mars::comm::isNetworkConnected()' /usr/bin/ld: Sample/libRtm.so: undefined reference to mars::comm::getSignal(bool)' /usr/bin/ld: Sample/libRtm.so: undefined reference to xlogger_maintid' /usr/bin/ld: Sample/libRtm.so: undefined reference to xlogger_tid' /usr/bin/ld: Sample/libRtm.so: undefined reference to mars::comm::getCurSIMInfo(mars::comm::SIMInfo&)' /usr/bin/ld: Sample/libRtm.so: undefined reference to mars::comm::getCurRadioAccessNetworkInfo(mars::comm::RadioAccessNetworkInfo&)' /usr/bin/ld: Sample/libRtm.so: undefined reference to `mars::comm::getNetInfo()'

我看主要是platform_comm类的,看错误有点像C++和C混用产生的,我的项目的文件全是C++,请问怎样能支持linux呢?

landuochong avatar Feb 10 '22 07:02 landuochong

编译过了么?

duanhjlt avatar Apr 27 '22 01:04 duanhjlt

getCurWifiInfo/getSignal/getNetInfo 这几个函数是根平台特性相关的,应该要自己实现一下就行了吧,否则链接的时候找不到符号的定义

flx413 avatar May 15 '22 09:05 flx413