Здравствуйте, сообщество. Я хотел бы написать пользовательский интерфейс для сервера OPC UA, используя open62541 lib. Программное обеспечение ввода должно читать текстовый файл и передавать данные через сервер уже доступному клиенту.
Застрял на этапе, когда необходимо скомпилировать файл DLL для дальнейшего использования в проекте форм Windows.
Упоминается некоторая информация о том, что Дэви Трипонни скомпилировал его с помощью Visual C ++ 2013 https://github.com/open62541/open62541/wiki/Using-open62541-from-C%23
Но мне не повезло с VS 2017.
Последовательность моего продвижения:
- Уже загружены 64-битные файлы .h и .c для Windows с https://open62541.org/
- Создан проект библиотеки динамической компоновки (DLL).
- К проекту прикреплены файлы .h и .c, выбран компилятор 64:
Получение предупреждений и ошибок при сборке:
Severity Code Description Project File Line Suppression State
Warning C4005 'CLOSESOCKET': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39113
Warning C4005 '_Q_INVALIDATE': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 130
Warning C4005 'UA_atomic_sync': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 813
Warning C4005 'UA_atomic_sync': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 815
Warning C4005 'CLOSESOCKET': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 35386
Warning C4005 'errno__': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 35387
Warning C4005 'CLOSESOCKET': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39088
Warning C4005 'CLOSESOCKET': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39106
Warning C4005 'UA_sleep_ms': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39111
Warning C4005 'UA_sleep_ms': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39127
Warning C4005 'UA_sleep_ms': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39130
Warning C4005 'WIN32_INT': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39135
Warning C4005 'OPTVAL_TYPE': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39136
Warning C4005 'ERR_CONNECTION_PROGRESS': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39137
Warning C4005 'UA_fd_set': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39167
Warning C4005 'UA_fd_isset': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39168
Warning C4005 'errno__': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39176
Warning C4005 'errno__': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39181
Warning C4005 'INTERRUPTED': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39182
Warning C4005 'WOULDBLOCK': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39183
Warning C4005 'AGAIN': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 39184
Warning C4005 'ANSI_COLOR_RED': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40158
Warning C4005 'ANSI_COLOR_GREEN': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40159
Warning C4005 'ANSI_COLOR_YELLOW': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40160
Warning C4005 'ANSI_COLOR_BLUE': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40161
Warning C4005 'ANSI_COLOR_MAGENTA': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40162
Warning C4005 'ANSI_COLOR_CYAN': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40163
Warning C4005 'ANSI_COLOR_RESET': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40164
Warning C4005 'BEGIN_CRITSECT': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40709
Warning C4005 'END_CRITSECT': macro redefinition open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 40710
Error C1010 unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? open62541 c:\users\scadaadmin\desktop\open62541-win64\open62541.c 43979
Вопрос в том, как я могу скомпилировать файл dll с кодом open62541 c с помощью Visual Studio 2017, чтобы использовать его в приложении Windows Forms C # в качестве сервера?