Hello,
I try to compile the example program of the Getting Started on Windows but it fails so far with unknown typedefs. Modbus.h also can not find the corrects typedefs located in stdint.h or cstdint.
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\cstdint(21,25): error C2039: 'int8_t': is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\cstdint(21,13): error C2873: 'int8_t': symbol cannot be used in a using-declaration
and many more errors
The folder
C:/Program Files/libmodbus/include/ contains:
- modbus.h
- modbus-rtu.h
- modbus-tcp.h
- modbus-version.h
- stdint.h
The folder C:/Program Files/libmodbus/lib/x64/Release/ contains:
- modbus.dll
- modbus.lib
My CMakeLists.txt look s like.
```
cmake_minimum_required(VERSION 3.20)
set(PROJECT_NAME modbusTcp)
project(${PROJECT_NAME} VERSION 0.1)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
link_directories("C:/Program Files/libmodbus/lib/x64/Release/")
include_directories("C:/Program Files/libmodbus/include/")
add_executable(${PROJECT_NAME}
src/main.cpp)
target_link_libraries(${PROJECT_NAME} wsock32 ws2_32)
target_link_libraries(${PROJECT_NAME} libmodbus)
```
Any idea how to solve the problem and compile correctly?