Closed jjqqkk closed 1 year ago
The Java sample code works nicely:
/opt/ForexConnectAPI-1.6.5-Linux-x86_64/samples/java/NonTableManagerSamples/Login
So the problem: C++ sample code cannot connect to server, while Java is OK.
try with https, test the connection with telnet from command line: telnet fxcorporate.com 443 I tested same Linux version on Ubuntu 17.1 and it works ok.
try with https, test the connection with telnet from command line: telnet fxcorporate.com 443 I tested same Linux version on Ubuntu 17.1 and it works ok.
Thanks. Tried again with HTTPS, same error. Switched to the v1.6.4 SDK, both C++ and Java sample code work nicely.
Anything I can do to troubleshoot this error?
I have fixed the problem by removing the v1.6.4 shared library path from /etc/ld.so.conf.d
and add the v1.6.5 path:
root@tradebot:/etc/ld.so.conf.d# cat fc.conf
#/opt/ForexConnectAPI-1.6.4-Linux-x86_64/lib
#/opt/ForexConnectAPI-1.6.4-Linux-x86_64/lib/java
/opt/ForexConnectAPI-1.6.5-Linux-x86_64/lib
/opt/ForexConnectAPI-1.6.5-Linux-x86_64/lib/java
Refresh the lib cache with ldconfig
, then all C++ sample code run nicely.
I am using the FC SDK v1.6.5 C++ version to write my program. It's running well on macOS with the default toolchain, every feature has been tested and passed.
However, the same code fails to login on a Debian-9 box, kernel 4.9.0-15-amd64. I've tested with both GCC12 and Clang14.
After inspecting my own code, I gave it a test with the sample code under the directory
/opt/ForexConnectAPI-1.6.5-Linux-x86_64/samples/cpp/
.None of the sample code can perform login successfully. And the error messages are same:
I have checked firewall, also curl the URL directly, i am sure the HTTP request can be sent to the server.
And the same machine is running FXCM Rest API client without any problem.
Could you give me any tip on how to debug such issue?
Thanks.