Fwd: Visual Studio libmodbus static linking library

117 views
Skip to first unread message

Alessandro Fici

unread,
Nov 25, 2020, 8:19:00 AM11/25/20
to libm...@googlegroups.com
Hi,
I'm trying to build a new dll that includes libmodbus as a static library and not as a dll. The problem is that I cannot compile it because I'm experiencing several linking errors. 
Following the step I did:
1) I built the VS libmodbus project changing the Project Defaults -> Configuration Type from .dll to .lib and no error was raised and so I got the modbus.lib
general.PNG
2) In my VS2015 dll project I put modbus.lib in the additional dependencies.
image.png


I built my new dll and I got these errors:
errors.PNG

So, is it possible to statically link libmodbus in Windows? 
I thank you in advance for your help,
Looking forward to hearing from you.

Alessandro Fici


--
Logo SPEA
Alessandro Fici
Software Engineer
Via Torino 16, 10088 Volpiano (TO) - Italy
Linkedin Facebook YouTube Twitter Instagram

This message is intended solely for the designated recipient, may contain privileged or confidential information and may be subject to confidentiality agreement(s). Access to this e-mail by anyone else, other than the designated recipient, is unauthorized.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful and/or in violation of EU REG 2016/679 for the protection of personal data.  If you have received this message in error, please notify the sender immediately by reply e-mail and destroy the original communication.
Reply all
Reply to author
Forward
0 new messages