Программы на C++. Форум разработчиков
-
Anonymous
Boost Asio: '...': нет доступных пакетов параметров для расширения.
Сообщение
Anonymous »
Я пытаюсь использовать boost asio для отправки некоторых пакетов udp, но получаю:
Код: Выделить всё
[main] Building folder: C:/Users/tom.mclean/src/Nemo/build nemo
[build] Starting build
[proc] Executing command: C:\Users\tom.mclean\AppData\Local\miniconda3\Scripts\cmake.EXE --build C:/Users/tom.mclean/src/Nemo/build --parallel 18 --target nemo --
[build] [0/2] Re-checking globbed directories...
[build] [1/3] Building CXX object CMakeFiles\nemo.dir\nemo\nemo.cpp.obj
[build] FAILED: CMakeFiles/nemo.dir/nemo/nemo.cpp.obj
[build] C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx86\x86\cl.exe /nologo /TP -DBOOST_CONTAINER_DYN_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTEXT_DYN_LINK="" -DBOOST_CONTEXT_EXPORT=EXPORT -DBOOST_CONTEXT_NO_LIB="" -DBOOST_COROUTINES_DYN_LINK -DBOOST_COROUTINE_DYN_LINK -DBOOST_COROUTINE_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_FILESYSTEM_NO_LIB -DBOOST_UUID_FORCE_AUTO_LINK -DEZXML_NOMMAP -DFMI4C_STATIC -DHAVE_MEMMOVE=1 -DUSE_FILE32API -IC:\Users\tom.mclean\src\Nemo\external\ODSClient\include -IC:\Users\tom.mclean\src\Nemo\external\fmi4c\include -IC:\Users\tom.mclean\src\Nemo\external\fmi4c\3rdparty -IC:\Users\tom.mclean\src\Nemo\external\fmi4c\3rdparty\minizip -external:IC:\Users\tom.mclean\src\Nemo -external:IC:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include -external:IC:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include\eigen3 -external:IC:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include\SDL2 -external:W0 /DWIN32 /D_WINDOWS /GR /EHsc /O2 /Ob2 /DNDEBUG -std:c++20 -MD /bigobj /showIncludes /FoCMakeFiles\nemo.dir\nemo\nemo.cpp.obj /FdCMakeFiles\nemo.dir\nemo.pdb /FS -c C:\Users\tom.mclean\src\Nemo\nemo\nemo.cpp
[build] Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:
[build] - add -D_WIN32_WINNT=0x0601 to the compiler command line; or
[build] - add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.
[build] Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
[build] C:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include\boost/asio/co_composed.hpp(162): error C3546: '...': there are no parameter packs available to expand
[build] C:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include\boost/asio/co_composed.hpp(163): note: see reference to class template instantiation 'boost::asio::detail::co_composed_state_return' being compiled
[build] ninja: build stopped: subcommand failed.
[proc] The command: C:\Users\tom.mclean\AppData\Local\miniconda3\Scripts\cmake.EXE --build C:/Users/tom.mclean/src/Nemo/build --parallel 18 --target nemo -- exited with code: 1
[driver] Build completed: 00:00:08.065
[build] Build finished with exit code 1
Мой минимальный пример:
Код: Выделить всё
#include
#include
int main() {
try {
boost::asio::io_context io_context;
boost::asio::ip::udp::endpoint server_endpoint(boost::asio::ip::make_address("127.0.0.1"), 12345);
boost::asio::ip::udp::socket socket(io_context);
socket.open(boost::asio::ip::udp::v4());
const std::string message = "Hello, UDP Server!";
socket.send_to(boost::asio::buffer(message), server_endpoint);
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79276056/boost-asio-there-are-no-parameter-packs-available-to-expand[/url]
1734309280
Anonymous
Я пытаюсь использовать boost asio для отправки некоторых пакетов udp, но получаю:
[code][main] Building folder: C:/Users/tom.mclean/src/Nemo/build nemo
[build] Starting build
[proc] Executing command: C:\Users\tom.mclean\AppData\Local\miniconda3\Scripts\cmake.EXE --build C:/Users/tom.mclean/src/Nemo/build --parallel 18 --target nemo --
[build] [0/2] Re-checking globbed directories...
[build] [1/3] Building CXX object CMakeFiles\nemo.dir\nemo\nemo.cpp.obj
[build] FAILED: CMakeFiles/nemo.dir/nemo/nemo.cpp.obj
[build] C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1436~1.325\bin\Hostx86\x86\cl.exe /nologo /TP -DBOOST_CONTAINER_DYN_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTEXT_DYN_LINK="" -DBOOST_CONTEXT_EXPORT=EXPORT -DBOOST_CONTEXT_NO_LIB="" -DBOOST_COROUTINES_DYN_LINK -DBOOST_COROUTINE_DYN_LINK -DBOOST_COROUTINE_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_FILESYSTEM_NO_LIB -DBOOST_UUID_FORCE_AUTO_LINK -DEZXML_NOMMAP -DFMI4C_STATIC -DHAVE_MEMMOVE=1 -DUSE_FILE32API -IC:\Users\tom.mclean\src\Nemo\external\ODSClient\include -IC:\Users\tom.mclean\src\Nemo\external\fmi4c\include -IC:\Users\tom.mclean\src\Nemo\external\fmi4c\3rdparty -IC:\Users\tom.mclean\src\Nemo\external\fmi4c\3rdparty\minizip -external:IC:\Users\tom.mclean\src\Nemo -external:IC:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include -external:IC:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include\eigen3 -external:IC:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include\SDL2 -external:W0 /DWIN32 /D_WINDOWS /GR /EHsc /O2 /Ob2 /DNDEBUG -std:c++20 -MD /bigobj /showIncludes /FoCMakeFiles\nemo.dir\nemo\nemo.cpp.obj /FdCMakeFiles\nemo.dir\nemo.pdb /FS -c C:\Users\tom.mclean\src\Nemo\nemo\nemo.cpp
[build] Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:
[build] - add -D_WIN32_WINNT=0x0601 to the compiler command line; or
[build] - add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.
[build] Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
[build] C:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include\boost/asio/co_composed.hpp(162): error C3546: '...': there are no parameter packs available to expand
[build] C:\Users\tom.mclean\src\vcpkg_installed\x86-windows\include\boost/asio/co_composed.hpp(163): note: see reference to class template instantiation 'boost::asio::detail::co_composed_state_return' being compiled
[build] ninja: build stopped: subcommand failed.
[proc] The command: C:\Users\tom.mclean\AppData\Local\miniconda3\Scripts\cmake.EXE --build C:/Users/tom.mclean/src/Nemo/build --parallel 18 --target nemo -- exited with code: 1
[driver] Build completed: 00:00:08.065
[build] Build finished with exit code 1
[/code]
Мой минимальный пример:
[code]#include
#include
int main() {
try {
boost::asio::io_context io_context;
boost::asio::ip::udp::endpoint server_endpoint(boost::asio::ip::make_address("127.0.0.1"), 12345);
boost::asio::ip::udp::socket socket(io_context);
socket.open(boost::asio::ip::udp::v4());
const std::string message = "Hello, UDP Server!";
socket.send_to(boost::asio::buffer(message), server_endpoint);
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79276056/boost-asio-there-are-no-parameter-packs-available-to-expand[/url]