У меня вопрос об исходном коде Zabbix и файлах ресурсов.
В коде есть файл с именем resource.rc
. Когда я открываю файл, я вижу, что это автоматически сгенерированный файл.
Я хочу собрать исходный код Zabbix на Windows для генерации Zabbix Agent 2. https://www.zabbix.com/documentation/current/manual/installation/install/building_zabbix_agent_2_on_windows
Но когда я собираю его с помощью Visual Studio Code, я получаю ошибки сборки. Какие инструменты (IDE и компилятор) вам нужны для компиляции файла .rc
? У меня установлены Visual Studio Code и MingW-W64.
ПРИМЕЧАНИЕ. Я загрузил исходный код из ветки выпуска Zabbix 5.0, поэтому очень маловероятно, что с кодом что-то не так. Поэтому я подозреваю, что использую неправильные инструменты для создания кода.
Вот полный журнал:
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsys\threads.c -o output\threads.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\str.c -o output\str.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\misc.c -o output\misc.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxwin32\fatal.c -o output\fatal.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxwin32\disk.c -o output\disk.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\iprange.c -o output\iprange.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcrypto\md5.c -o output\md5.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -DWITH_COMMON_METRICS -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsysinfo\sysinfo.c -o output\sysinfo.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxalgo\vector.c -o output\vector.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -DPCRE_STATIC -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxregexp\zbxregexp.c -o output\zbxregexp.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\zabbix_agent\logfiles\logfiles.c -o output\logfiles.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\file.c -o output\file.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxcommon\alias.c -o output\alias.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxalgo\algodefs.c -o output\algodefs.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsysinfo\common\system.c -o output\sysinfo_system.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsysinfo\common\dns.c -o output\sysinfo_dns.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\libs\zbxsysinfo\common\dir.c -o output\sysinfo_dir.o
gcc -O2 -g -DUNICODE -DHAVE_STDINT_H=1 -DZBX_BUILD_AGENT2=1 -DHAVE_THREAD_LOCAL=1 -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\include -IC:\dev\zabbix-release-5.0\build\mingw\..\..\build\mingw -IC:\dev\zabbix-release-5.0\build\mingw\..\..\include -DHAVE_OPENSSL=1 -DHAVE_OPENSSL_WITH_PSK=1 -Ic:\dev\openssl\include -Ic:\dev\pcre\include -c C:\dev\zabbix-release-5.0\build\mingw\..\..\src\zabbix_agent\eventlog.c -IC:\dev\zabbix-release-5.0\build\mingw\..\..\go\win64 -o output\eventlog.o
windres.exe C:\dev\zabbix-release-5.0\build\mingw\..\..\build\win32\project\resource.rc --input-format=rc -O coff --target=pe-x86-64 -D _WINDOWS -D ZABBIX_AGENT2 -o C:\dev\zabbix-release-5.0\build\mingw\..\..\src\go\cmd\zabbix_agent2\resource.syso
windres.exe: C:\\dev\\zabbix-release-5.0\\build\\mingw\\..\\..\\build\\win32\\project\\resource.rc:75: syntax error
mingw32-make: [Makefile:145: C:\dev\zabbix-release-5.0\build\mingw\..\..\src\go\cmd\zabbix_agent2\resource.syso] Error 1