krisn / lws2mql

Websocket client library for MetaTrader Platform. Supports MQL4 and MQL5.
MIT License
113 stars 76 forks source link

64bits #7

Open pedro-rcs opened 4 years ago

pedro-rcs commented 4 years ago

Hi. Has anyone been able to execute the code in MetaTrader 5 64 bits? I couldn't even compile the dll in 64 bits. What am I doing wrong? Thank you very much.

dompauling commented 4 years ago

I tried hard but couldn't get it to work. The reason is libwebsockets went through some big refactoring, changing names from libwebsockets to lws for example. To understand how everything is connected probably exceeds my knowledge/skills. Any ideas/help is greatly appreciated.

Here is what I did:

I replaced the libwebsockets.dll with a 64bit version from december 2019 (lws-x64-29665442). Then compiled as described in the intro by krisn. First I got many 'undefined reference' errors. So I edit lws2mql.c and libwebsockets.h to update the names:

libwebsocket_write -> lws_write libwebsocket_create_context -> lws_create_context libwebsocket_context_destroy -> lws_context_destroy libwebsocket_client_connect -> lws_client_connect_via_info (not sure if this is correct) libwebsocket_callback_on_writable -> lws_callback_on_writable libwebsocket_service -> lws_service

Then I compiled again. Now I still get one 'undefined reference' error for libwebsocket_get_internal_extensions I can't find any equivalent for this in libwebsockets...

I fear that not only the names may be changed, but also the logic/signatures/parameters etc. Maybe we can combine powers to solve this and make it 64bit ready! What do you think?

pedro-rcs commented 4 years ago

It seems that little is left to run perfectly on 64 bits. At the moment I am very busy with work and I cannot help with this mission.

My knowledge is also not very great in this area, since I didn't even compile it. However, as soon as I finish some work, I will dedicate myself to the conversion to 64 bits of lws2mql.

StasToken commented 3 years ago

This is relevant - although I personally have not been able to build a project to date, can anyone have a normal instruction on how to build it?

brenoperucchi commented 3 years ago

Hi! Did anyone get a solution for this problem in this project or with another project?

RalphCodesTheInternet commented 2 years ago

Also wondering about this?