M
M
MasterCopipaster2021-03-14 00:41:40
C++ / C#
MasterCopipaster, 2021-03-14 00:41:40

Help building a DLL from GitHub to GCC?

Good day to all, I'm trying to build a project located on github , if in short it's a dll library for working with WS

It seems that everything is going to 2 commands:

gcc -c -DLWS_EXPORTS lws2mql.c

and
gcc -shared -o lws2mql.dll lws2mql.o -L..\lib\ -lwebsockets

The trouble is that the second command does not work and gives an error


C:\C++\lws2mql\src>gcc -shared -o lws2mql.dll lws2mql.o -L..\lib\ -lwebsockets
c:/gcc/bin/../lib/gcc/x86_64-w64-mingw32/8.3 .0/../../../../x86_64-w64-mingw32/bi
n/ld.exe: cannot find -lwebsockets
collect2.exe: error: ld returned 1 exit status

C:\C++\lws2mql\ src>


After some digging, I found a similar problem: here
If it's simpler, he suggested changing the paths to such
ones. It seems like it worked for him, but in my case it does not work.

C:\C++\lws2mql\src>gcc -shared -o lws2mql.dll lws2mql.o -L..\MQL5\Libraries\ -lw
ebsockets
c:/gcc/bin/../lib/gcc/x86_64-w64- mingw32/8.3.0/../../../../x86_64-w64-mingw32/bi
n/ld.exe: skipping incompatible ..\MQL5\Libraries\/libwebsockets.dll when search
ing for -lwebsockets
c:/gcc/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bi
n/ld.exe: skipping incompatible ..\MQL5\Libraries\/libwebsockets.dll when search
ing for -lwebsockets
c:/gcc/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../.. /../x86_64-w64-mingw32/bi
n/ld.exe: cannot find -lwebsockets
collect2.exe: error: ld returned 1 exit status

C:\C++\lws2mql\src>


In general, I don’t know what to do, because I don’t understand why it doesn’t find the file, and I ask for help from experts - how to assemble this stray?
I use: gcc (GCC) 8.3.0 OS
Win7 x64

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question