We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use CMake to generate a ninja.build file, which I use to try to build the library. However, it fails with the following output:
ninja.build
nil@DESKTOP-0K54F8M MINGW64 /path/to/spdlog/build (v1.x) $ ninja [4/10] Building CXX object example/CMakeFiles/example.dir/example.cpp.obj FAILED: example/CMakeFiles/example.dir/example.cpp.obj C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\C__~1.EXE -DSPDLOG_COMPILED_LIB -I../include -O3 -DNDEBUG -std=c++11 -MD -MT example/CMakeFiles/example.dir/example.cpp.obj -MF example\CMakeFiles\example.dir\example.cpp.obj.d -o example/CMakeFiles/example.dir/example.cpp.obj -c ../example/example.cpp In file included from ../include/spdlog/sinks/udp_sink.h:10, from ../example/example.cpp:232: ../include/spdlog/details/udp_client-windows.h: In constructor 'spdlog::details::udp_client::udp_client(const string&, uint16_t)': ../include/spdlog/details/udp_client-windows.h:67:13: error: 'InetPton' was not declared in this scope if (InetPton(PF_INET, TEXT(host.c_str()), &addr_.sin_addr.s_addr) != 1) ^~~~~~~~ ../include/spdlog/details/udp_client-windows.h:67:13: note: suggested alternative: 'inet_ntoa' if (InetPton(PF_INET, TEXT(host.c_str()), &addr_.sin_addr.s_addr) != 1) ^~~~~~~~ inet_ntoa [8/10] Building CXX object CMakeFiles/spdlog.dir/src/spdlog.cpp.obj ninja: build stopped: subcommand failed.
Can someone please help me with how to debug/overcome this issue, please?
The text was updated successfully, but these errors were encountered:
Did you overcome this issue ?which version of ming2 are you using ?
Sorry, something went wrong.
Under the Windows Platform, Open as Administrator the x64 Native Tools Command Prompt for VS 2022 command prompt window execution:
x64 Native Tools Command Prompt for VS 2022
$ cd spdlog && mkdir build && cd build $ cmake .. -G "Ninja" && ninja install
config CMakeLists.txt :
CMakeLists.txt
cmake_minimum_required(VERSION 3.21) project(01-hello) set(CMAKE_PREFIX_PATH C:/Program Files (x86)) find_package(spdlog REQUIRED) add_executable(${PROJECT_NAME} main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog spdlog::spdlog_header_only)
Same issue here.
A simple workaround is to set -DSPDLOG_BUILD_EXAMPLE=OFF since this issue is in example codes
-DSPDLOG_BUILD_EXAMPLE=OFF
No branches or pull requests
I use CMake to generate a
ninja.build
file, which I use to try to build the library. However, it fails with the following output:Can someone please help me with how to debug/overcome this issue, please?
The text was updated successfully, but these errors were encountered: