x64 C++ build of libmodbus using visual studio

1,748 views
Skip to first unread message

Johannes Bues

unread,
Apr 4, 2017, 12:15:59 PM4/4/17
to libmodbus
Hello everybody,

I'm happily using libmodbus since a while in some C++ code. Due to hardware changes I'm forced to migrate this code from win32 to x64 in visual studio (2015).
Sadly, there is very little online specifically for building the libmodbus library from scratch and I'm unexperienced in this (I searched around for a whole day now).
The win32 library by now is compiling fine for me.

So I have following questions:
Is migration of libmodbus to x64 possible?
If yes, how can I do it? (A step by step explanation would be amazing)

Thanks everybody, and especially to the developers maintaining such a nice library!

Stéphane Raimbault

unread,
Apr 4, 2017, 4:39:11 PM4/4/17
to libm...@googlegroups.com
Oh yes, I only use libmodbus on x64 architecture for years but on Linux systems.

Could anyone share its experience on libmodbus Windows x64?

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libmodbus+unsubscribe@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

kt kt

unread,
Jul 22, 2019, 8:11:34 AM7/22/19
to libmodbus
@Johannes Bues did you get the solution for this ? If yes, please provide steps it would be really helpful.


On Wednesday, 5 April 2017 02:09:11 UTC+5:30, Stephane Raimbault wrote:
Oh yes, I only use libmodbus on x64 architecture for years but on Linux systems.

Could anyone share its experience on libmodbus Windows x64?
Le 4 avr. 2017 6:16 PM, "Johannes Bues" <buesjo...@gmail.com> a écrit :
Hello everybody,

I'm happily using libmodbus since a while in some C++ code. Due to hardware changes I'm forced to migrate this code from win32 to x64 in visual studio (2015).
Sadly, there is very little online specifically for building the libmodbus library from scratch and I'm unexperienced in this (I searched around for a whole day now).
The win32 library by now is compiling fine for me.

So I have following questions:
Is migration of libmodbus to x64 possible?
If yes, how can I do it? (A step by step explanation would be amazing)

Thanks everybody, and especially to the developers maintaining such a nice library!

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "libmodbus".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse libm...@googlegroups.com.

Ksawery Rettinger

unread,
Jul 22, 2019, 9:45:16 AM7/22/19
to libmodbus
Hello, 

I'm also trying to build the library in Visual Studio 2019, Windows x64, and get the following errors:

libmodbus build errors.PNG


Any help would be greatly appreciated.

Regards,
Ksawery

MJ T

unread,
Jan 31, 2020, 9:45:20 PM1/31/20
to libmodbus
Did you find a workaround????

Matthew Wachter

unread,
Jun 10, 2020, 1:38:11 PM6/10/20
to libmodbus
Just taking a stab at this myself. I'm on Visual Studio 2015.

Has anyone made any progress or found any resources?

Matthew Wachter

unread,
Jun 15, 2020, 1:44:31 PM6/15/20
to libmodbus
Ok, got it to compile in x64 without too much difficulty. Just set your platform to x64 and make sure your set these settings in the project property pages:

  • General / Project Defaults / Configuration Type = Dynamic Library (.dll)
  • Linker / Input / Additional Dependencies = ws2_32.lib

Edgar Schroeder

unread,
Sep 7, 2021, 9:47:03 PM9/7/21
to libmodbus
Thanks Matthew that worked perfectly for me
Reply all
Reply to author
Forward
0 new messages