physercoe/starquant

make failure in ubuntu

Closed this issue · 4 comments

所有第三方库安装完毕
cmake .. 无报错
make 出现如下错误,求解!

/usr/bin/ld: cannot find -lLinuxDataCollect
/usr/bin/ld: cannot find -lthosttraderapi
/usr/bin/ld: cannot find -lthostmduserapi
/usr/bin/ld: cannot find -lTapQuoteAPI
/usr/bin/ld: cannot find -lTapTradeAPI
collect2: error: ld returned 1 exit status
StarQuant/CMakeFiles/starquant.dir/build.make:558: recipe for target 'StarQuant/libstarquant.so' failed
make[2]: *** [StarQuant/libstarquant.so] Error 1
CMakeFiles/Makefile2:983: recipe for target 'StarQuant/CMakeFiles/starquant.dir/all' failed
make[1]: *** [StarQuant/CMakeFiles/starquant.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

排查错误发现是因为CTP等接口没有手动安装。可否有简易CTP安装教程,查询好久不得其法

就是把相关的库文件(如libthosttradeapi.so,需要从ctp官网下载;如果名称不一致要么重命名,要么改cmakelist)放到动态链接库的地方,如/usr/lib。另外里面TapQuoteAPI/TapTradeAPI是易盛的api,可以在cmakelist里面去掉。

如果不了解cmake,建议先学习一下cmake基本知识,同时把linux下的编译链接的基本过程也了解一下。

感谢。我去学习尝试以下