I'm struggling really hard to make it work so I decided to look for help here.
I've written a program using Winsock2, for Windows, and no matter what I try, the library bundle that I create after compiling the objects seems to not be found (even testing my Makefile script with other program that compiles multiple sources) and there are all commands that I execute:
gcc -Isrc -c src/socketutils.c -o obj/socketutils.o
gcc -Isrc -c src/protocolutils.c -o obj/protocolutils.o
ar rcs lib/libacolytus.a obj/socketutils.o obj/protocolutils.o
gcc -c main.c -o obj/main.o -lwsock32 -lws2_32
gcc -shared -fPIC -o lib/libacolytus.so obj/socketutils.o obj/protocolutils.o -lwsock32 -lws2_32
gcc -o main main.c lib/libacolytus.so
But although everything runs fine, when I try to execute the main.exe
the following error appears. What shall I do? (Windows 8.1
and MinGW GCC 7.3.0
)