-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build lib and dll with vs2015 under win64 #557
Comments
Hi YiGene,
config.cmake.in is the file used to create modbusConfig.cmake (used by FindPackage to generate configuration variables). Here the content:
|
Related to 9a7ea12 |
Hi @stephane and everyone. I am not sure if you consider this useful but if you do then I am ready to volunteer to make the README file bigger with steps to create a dll file. Just to elaborate I added a Macros DLL_EXPORT in modbus.h file as below:
And then in appropriate header file I added this DLL_EXPORT to all the important methods that should be exported. One Example is shown :
Let me know what you think of this making README more elaborative! |
Yes please, this would be very useful information. |
Hi @stephane. Did you get a chance to look at the new |
Why no one can leave the build dll files here so that we can download them? Rights problems? Can anyone please upload it? THX |
@ottelo9 Check the wiki page of this project. They have mentioned a google-drive link to share it. Navigate here in case you are having difficulty: |
thanks for your answer. That is my dll that I uploaded few years ago 😂😂😂. Yesterday I compiled v3.1.10. I will upload it again and put it on wiki. |
It seems that the 64-bit version cannot be compiled. I can compile the 32-bit version. Can you compile the 64-bit version of the DLL? |
@luocheng610 |
No problem, I'll upload it |
@luocheng610 |
Hi @msk-repo-0x4d im trying to make a dll with libmodbus in c++ and then run that dll in c# but im facing a lot of errors could you pls help me tackle them? my email is: [email protected]. |
it take me some time to get it build to 64bit under 2015 hence i put a note here
after we choose x64 to debug and release, run build
we see below errors:
1> d:\modbus\libmodbus-3.1.6\src\modbus.h(228): note: see previous definition of 'modbus_mapping_free'
1> Generating Code...
1> Link:
1> Creating library D:\modbus\libmodbus-3.1.6\src\win32\x64\Debug\modbus.lib and object D:\modbus\libmodbus-3.1.6\src\win32\x64\Debug\modbus.exp
1> 1>
1>modbus-rtu.obj : warning LNK4217: locally defined symbol modbus_free imported in function modbus_new_rtu
1> 1>
1>modbus-tcp.obj : warning LNK4217: locally defined symbol modbus_free imported in function _modbus_tcp_init_win32
1> 1>
1>modbus.obj : warning LNK4217: locally defined symbol modbus_set_bits_from_bytes imported in function modbus_reply
1> 1>
1>modbus-data.obj : error LNK2019: unresolved external symbol __imp_htonl referenced in function modbus_set_float_abcd
1> 1>
add ws2_32.lib
build success
**PLEASE NOTE i didn't test the function, just build it **
The text was updated successfully, but these errors were encountered: