I compiled the project with Visual Studio 2008 in Win10. I put the dll and lib and all header files in my new C project and put the code from unit-test-server into my main. I want to use RTU Slave (Server) and my port 1:
ctx = modbus_new_rtu("\\\\.\\COM1", 115200, 'N', 8, 1);
rc = modbus_connect(ctx);
rc = modbus_receive(ctx, query);
Blocks ... inside the function :(
I use #include <winsock2.h> together with WSock32.lib.