执行 g++ -shared -fPIC ../../ctp_c/trade.cpp -o ./ctp_trade.so ./thosttraderapi.so
出现以下错误。
ld: warning: ignoring file ./thosttraderapi.so, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): ./thosttraderapi.so
Undefined symbols for architecture x86_64:
"CThostFtdcTraderApi::CreateFtdcTraderApi(char const*)", referenced from:
_CreateApi in trade-156781.o
ld: symbol(s) not found for architecture x86_64
执行 g++ -shared -fPIC ../../ctp_c/trade.cpp -o ./ctp_trade.so ./thosttraderapi.so 出现以下错误。 ld: warning: ignoring file ./thosttraderapi.so, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): ./thosttraderapi.so Undefined symbols for architecture x86_64: "CThostFtdcTraderApi::CreateFtdcTraderApi(char const*)", referenced from: _CreateApi in trade-156781.o ld: symbol(s) not found for architecture x86_64