Home > Software engineering >  How to use in vs2013 libmodbus library
How to use in vs2013 libmodbus library

Time:09-21

In's official website to download the libmodbus (two versions have 3.0.6 and 3.1.2) library, has been in the vs2013 call is not successful, under the guidance of the great god,

CodePudding user response:

Read the library own the README file,

CodePudding user response:

reference 1/f, zhao teacher reply:
reading library comes with a README file,
miss zhao, the write feel a little broad, I still don't know how to operate the

CodePudding user response:

hello! I also want to transplant libModbus used to VS2015, what method to have excuse me?

CodePudding user response:

I tried a method:
With the MINGW msys configuration first configure generated config. H.
Under the config. H and SRC. H and. C to join to use VS solution;
Download inttypes. H and stdint. H join VS solution
The result that not line!!!!!!

CodePudding user response:

Always call you don't succeed somehow say about what's wrong? Compile and link errors of solution is not the same

CodePudding user response:

Test no problem ah, compile successfully for the DLL file,
No test equipment, so I can't do function test,



Compile environment vs2013 sp2

CodePudding user response:

Can use the test software

CodePudding user response:

In this way can I compile success
Please refer to, can be in VS2010 and VS2015

Visual Studio 2013


Git clone git://github.com/stephane/libmodbus, download libmodbus code package,
Double click on the "\ libmodbus \ SRC \ win32" "configure. Js files in the directory, run the file
Use the Visual Studio 2013 to open the modbus - 9. SLNS files detected, compile the release version

CodePudding user response:

Compile time may appear the following error:
LINK: fatal error LNK1117: syntax error in the option 'VERSION: 1.0.0'
Solution: On the Settings (Project & gt; Settings & gt; Would) o the "Version" entry. Delete the 1.0.0 sure can

CodePudding user response:

Sorry guys, I can use, have not come to see this post, run the following problems can be solved, baidu

CodePudding user response:

Need to modify the code can be used, are learning!

CodePudding user response:

If you want to compile with Microsoft Visual Studio, you need to install
To fill the absence of stdint. H.

CodePudding user response:

Modbus is a very simple protocol, it is ok to write their own code, without the need for libraries

CodePudding user response:

Teacher I have recently been learning the Modbus protocol, don't know how to write code as you said, I want to use vc + + is to establish a software platform for PC, can read and write messages from PLC

CodePudding user response:

On the 14th floor worldy
reference response:
modbus is actually a very simple protocol, it is ok to write their own code, without the need for any library
teacher I have recently been learning the modbus protocol, don't know how to write code as you said, I want to use vc + + is to establish a software platform for PC, can read and write messages from PLC

CodePudding user response:

reference 4 floor Snoopy_Yuan response:
I tried a method:
With the MINGW msys configuration first configure generated config. H.
Under the config. H and SRC. H and. C to join to use VS solution;
Download inttypes. H and stdint. H join VS solution
The result that not line!!!!!!


Modbus is a very simple protocol, in fact, what also do not need library, oneself write a simple code can realize functions,
Does not send orders, return some data

CodePudding user response:

On the 14th floor worldy
reference response:
modbus is actually a very simple protocol, it is ok to write their own code, without the need for any library

If it is in his own a batch of machine to realize the modbus protocol communication, is not difficult, difficult in difficulty with all the common general platform support, this is a difficult, libMODBUS library has done it and this is why people write Shared libraries abroad have so many successful cases, and the cause of China's few and far between,
  • Related