Full disclosure: I'm not a C/C++ programmer, I can write basic programs like a calculator or some other very basic stuff where you don't need to use external libraries.
My goal is to use this modbus C library in a proof of concept piece of code that runs just the example line (with the IP and port changed) however I cannot wrap around my head on how to use the library.
In Python I know I could just run
import library_x
and I'd use Python, however the code needs to be in C and am completely lost when it comes to add this library. My understanding is that I should compile it in a static or dynamic library (dll) but I don't know if it's the right way to go.
Basically:
I want to run the example code in the documentation in the main of a C program, how can I do it?C
I am using Windows 10 and Visual Studio 2017.
I tried to add all the header files in the library (.h) in the Visual Studio project and compile it but it did not work.