CMake Error at runner/CMakeLists.txt:9 (add_executable): ( Flutter windows ) [closed] - windows

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 days ago.
Improve this question
I was working on a flutter project for android and I wanted to use it for windows to then I run it on windows x64 from vs code then I got that error
Launching lib\main.dart on Windows in debug mode...
CMake Error at runner/CMakeLists.txt:9 (add_executable):
Cannot find source file:
runner.exe.manifest
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
CMake Error at runner/CMakeLists.txt:9 (add_executable):
No SOURCES given to target: school_manager
CMake Generate step failed. Build files cannot be regenerated correctly.
Exception: Unable to generate build files
Exited (sigterm)
Here is my C:\flutter projects\school_manager\windows\flutter\CMakeLists.txt:
# This file controls Flutter-level build steps. It should not be edited.
cmake_minimum_required(VERSION 3.14)
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
# Configuration provided via flutter tool.
include(${EPHEMERAL_DIR}/generated_config.cmake)
# TODO: Move the rest of this into files in ephemeral. See
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
# Published to parent scope for install step.
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
list(APPEND FLUTTER_LIBRARY_HEADERS
"flutter_export.h"
"flutter_windows.h"
"flutter_messenger.h"
"flutter_plugin_registrar.h"
"flutter_texture_registrar.h"
)
list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
add_library(flutter INTERFACE)
target_include_directories(flutter INTERFACE
"${EPHEMERAL_DIR}"
)
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
add_dependencies(flutter flutter_assemble)
# === Wrapper ===
list(APPEND CPP_WRAPPER_SOURCES_CORE
"core_implementations.cc"
"standard_codec.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
"plugin_registrar.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
list(APPEND CPP_WRAPPER_SOURCES_APP
"flutter_engine.cc"
"flutter_view_controller.cc"
)
list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
# Wrapper sources needed for a plugin.
add_library(flutter_wrapper_plugin STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
)
apply_standard_settings(flutter_wrapper_plugin)
set_target_properties(flutter_wrapper_plugin PROPERTIES
POSITION_INDEPENDENT_CODE ON)
set_target_properties(flutter_wrapper_plugin PROPERTIES
CXX_VISIBILITY_PRESET hidden)
target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
target_include_directories(flutter_wrapper_plugin PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_plugin flutter_assemble)
# Wrapper sources needed for the runner.
add_library(flutter_wrapper_app STATIC
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_APP}
)
apply_standard_settings(flutter_wrapper_app)
target_link_libraries(flutter_wrapper_app PUBLIC flutter)
target_include_directories(flutter_wrapper_app PUBLIC
"${WRAPPER_ROOT}/include"
)
add_dependencies(flutter_wrapper_app flutter_assemble)
# === Flutter tool backend ===
# _phony_ is a non-existent file to force this command to run every time,
# since currently there's no way to get a full input/output list from the
# flutter tool.
set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
add_custom_command(
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
${PHONY_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
${FLUTTER_LIBRARY_HEADERS}
${CPP_WRAPPER_SOURCES_CORE}
${CPP_WRAPPER_SOURCES_PLUGIN}
${CPP_WRAPPER_SOURCES_APP}
)
and here is my C:\flutter projects\school_manager\windows\runner\CMakeLists.txt:
cmake_minimum_required(VERSION 3.14)
project(runner LANGUAGES CXX)
# Define the application target. To change its name, change BINARY_NAME in the
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
# work.
#
# Any new source files that you add to the application should be added here.
add_executable(${BINARY_NAME} WIN32
"flutter_window.cpp"
"main.cpp"
"utils.cpp"
"win32_window.cpp"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
"Runner.rc"
"runner.exe.manifest"
)
# Apply the standard set of build settings. This can be removed for applications
# that need different build settings.
apply_standard_settings(${BINARY_NAME})
# Disable Windows macros that collide with C++ standard library functions.
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
# Add dependency libraries and include directories. Add any application-specific
# dependencies here.
target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
# Run the Flutter tool portions of the build. This must not be removed.
add_dependencies(${BINARY_NAME} flutter_assemble)
I tried to download cMake file from cMake.org and add it to system environment variables but it did not work or maybe I did it wrong

Related

How to make Qt libraries a component in cpack installer?

I'm trying to build a Qt installer for my app using CMake and CPack with it's CPackIFW plugin. I'm using Windows. I've defined the main application component and a library, they both appear in the installer and are installed correctly. I also have a CPack pre-build script that runs windeployqt and adds the DLLs required by the application. However, as the DLLs are copied into the same folder as the main executable, I can't make them separate components. Is there a way to separate my artifacts from Qt DLLs and still be able to run the application after installation?
Here's my CMakeLists:
cmake_minimum_required(VERSION 3.22)
project(untitled-bot VERSION 0.1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets HttpServer TextToSpeech Sql)
qt_standard_project_setup()
set(app_icon_resource_windows "${CMAKE_CURRENT_SOURCE_DIR}/main.rc")
set(PROJECT_SOURCES
# sources here
)
qt_add_executable(untitled-bot
MANUAL_FINALIZATION
${PROJECT_SOURCES}
${app_icon_resource_windows}
)
set(executable_path "\${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:untitled-bot>")
qt_finalize_executable(untitled-bot)
add_subdirectory(external/lua)
target_link_libraries(untitled-bot
PRIVATE lua::lib
PRIVATE Qt6::Widgets
PRIVATE Qt6::HttpServer
PRIVATE Qt6::TextToSpeech
PRIVATE Qt6::Sql
)
target_include_directories(
untitled-bot
PRIVATE external/sol
)
set_target_properties(untitled-bot PROPERTIES
WIN32_EXECUTABLE TRUE
)
add_custom_target(copy_assets
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/scripts ${CMAKE_CURRENT_BINARY_DIR}/scripts
)
add_dependencies(untitled-bot copy_assets)
include(GNUInstallDirs)
install(TARGETS untitled-bot
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT main_app
)
install(TARGETS lua
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT main_app
)
#I think this should have added the dependencies component to the installer, but it didn't; however, the runtime DLLs are still added by `windeployqt` so this step can be omitted, I guess
set(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT runtime_dependencies)
include(InstallRequiredSystemLibraries)
set(CPACK_GENERATOR "IFW")
set(CPACK_IFW_ROOT "I:/Qt/Tools/QtInstallerFramework/4.4/")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set (CPACK_IFW_PACKAGE_NAME "application")
set (CPACK_IFW_PACKAGE_TITLE "application Installer")
set (CPACK_IFW_PACKAGE_WIZARD_STYLE "Modern")
set (CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST ON)
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt)
find_program(WINDEPLOYQT windeployqt HINTS "${_qt_bin_dir}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake.in" "${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake" #ONLY)
set(CPACK_PRE_BUILD_SCRIPTS ${CMAKE_CURRENT_SOURCE_DIR}/deploy-qt-windows.cmake)
set(CPACK_IFW_VERBOSE true)
include(CPack)
include(CPackIFW)
message(STATUS "${WORK_BIN_DIR}")
# this appears in the installer and is installed correctly; however, Qt DLLs are also part of the "main application" component
cpack_add_component(main_app DISPLAY_NAME "Main Application" DESCRIPTION "aaa" REQUIRED)
# this doesn't appear in the installer
cpack_add_component(runtime_dependencies DISPLAY_NAME "runtime dependencies" DESCRIPTION "bbb" REQUIRED)
# List controlling which components are installed
get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
# I also tried using set(CPACK_COMPONENTS_ALL "main_app;runtime_dependencies") but it doesn't add runtime libraries to the selection list
#set(CPACK_COMPONENTS_ALL main_app)
# in my case this only shows main_app
message(STATUS "CPACK_COMPONENTS_ALL = " ${CPACK_COMPONENTS_ALL})
# Install the runtime libs
cpack_ifw_configure_component(runtime_dependencies ESSENTIAL FORCED_INSTALLATION)
# The main app component HAS to be installed
cpack_ifw_configure_component(main_app ESSENTIAL FORCED_INSTALLATION)
# Adds license info to package.xml file
# Also copies licence.txt to 'meta' directory to display the license text in the installer.
cpack_ifw_configure_component(main_app LICENSES "GPLv3" ${CPACK_RESOURCE_FILE_LICENSE})
deploy-qt-windows.cmake.in:
set(WINDEPLOYQT "#WINDEPLOYQT#")
execute_process(COMMAND ${WINDEPLOYQT} "--no-quick-import" "--no-translations" "--no-system-d3d-compiler" "--no-opengl-sw" "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/main_app/data/bin")
It copies the required Qt libraries to the bin directory containing the application exe and they are picked up by CPack as part of the main app component.
Can you help me fix this?
Update: edited the original question to remove one of the problems, the one stated in the title still persists

Gtest discover_tests failing in Github Actions: Process terminated due to timeout

I am using google-test(gtest) with CMake and running the unit tests as GitHub ci jobs for Linux and Mac. The Linux jobs pass successfully. However, I am getting an error for the mac runner.
The error is
CMake Error at /usr/local/Cellar/cmake/3.21.1/share/cmake/Modules/GoogleTestAddTests.cmake:77 (message):
Error running test executable.
Path: '/Users/runner/work/splitwebp/build/test/splitwebp_tests'
Result: Process terminated due to timeout
Output:
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.21.1/share/cmake/Modules/GoogleTestAddTests.cmake:173 (gtest_discover_tests_impl)
This is the CMakelists.txt for the tests directory
# CMake config file for unit tests
# Requiring V 3.10 for gtest_discover_tests
cmake_minimum_required(VERSION 3.10)
find_package(OpenCV REQUIRED)
enable_testing()
# finds all .cpp files under this directory (./test) and add them to executable
file(GLOB_RECURSE tests "*.cpp")
file(GLOB_RECURSE source "../src/*.cpp")
add_executable(splitwebp_tests ${tests} ${source})
include_directories("../3rdparty/libwebp/include")
# Link gtest libraries
target_link_libraries(splitwebp_tests ${OpenCV_LIBS})
target_link_libraries(splitwebp_tests webp webpdemux pthread)
target_link_libraries(splitwebp_tests gtest_main)
set(CTEST_OUTPUT_ON_FAILURE 1)
# Find all tests in all .cpp files and convert to CTests
include(GoogleTest)
gtest_discover_tests(splitwebp_tests)
How do I fix the CI pipeline?
The problem is gtest_discover_tests(...) is taking too long and thus getting timed out. The obvious solution is to increase the timeout limit.
The line
gtest_discover_tests(splitwebp_tests)
can be replaced with
gtest_discover_tests(splitwebp_tests PROPERTIES TIMEOUT 600)

Catkin_make on the velodyne drivers fails in the windows 10 environemnt

I am trying to install the ROS-Velodyne drivers(https://github.com/ros-drivers/velodyne) in windows to capture the point cloud from velodyne LiDAR but getting error while running catkin_make.
Since these drivers require pcap library, i installed WinPcap in my system and updated the cmake of velodyne driver to find the required headers and link the library.
But on running the cmake, i am getting error on "target_link_libraries" (image shown)
Cannot specify link libraries for target "velodyne_driver" which is not
built by this project
Following is the cmake file of velodyne_driver package:
cmake_minimum_required(VERSION 2.8.3)
project(velodyne_driver)
# Set minimum C++ standard to C++11
if (NOT "${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}")
message(STATUS "Changing CXX_STANDARD from C++98 to C++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif ("${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}" STREQUAL "98")
message(STATUS "Changing CXX_STANDARD from C++98 to C++11")
set(CMAKE_CXX_STANDARD 11)
endif()
set(${PROJECT_NAME}_CATKIN_DEPS
diagnostic_updater
dynamic_reconfigure
nodelet
roscpp
tf
velodyne_msgs)
find_package(catkin REQUIRED COMPONENTS ${${PROJECT_NAME}_CATKIN_DEPS} roslint)
# This driver uses Boost threads
find_package(Boost REQUIRED COMPONENTS thread)
# kinger: libpcap provides no pkg-config or find_package module:
#message (STATUS "****** Starting PCAP Search in folder: ********")
set( PCAP_DIR "C:/workspace/WpdPack" )
#message (STATUS ${PCAP_DIR})
#kinger: Include file FindPCAP.cmake
include(FindPCAP.cmake)
#find_package( PCAP REQUIRED )
message (STATUS "******* FIND PCAP TASK FINISHED **********")
message (STATUS ${PCAP_FOUND})
message (STATUS ${PCAP_INCLUDE_DIRS})
message (STATUS ${PCAP_LIBRARY_DIRS})
message (STATUS ${PCAP_LIBRARIES})
#set(libpcap_LIBRARIES -lpcap)
if(PCAP_FOUND)
# Include Directories
include_directories( ${PCAP_INCLUDE_DIRS} )
# Library Directories (Option)
link_directories( ${PCAP_LIBRARY_DIRS} )
# Dependencies
target_link_libraries( ${PROJECT_NAME} ${PCAP_LIBRARIES} )
endif()
include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS})
# Generate dynamic_reconfigure server
generate_dynamic_reconfigure_options(cfg/VelodyneNode.cfg)
# objects needed by other ROS packages that depend on this one
catkin_package(CATKIN_DEPENDS ${${PROJECT_NAME}_CATKIN_DEPS}
INCLUDE_DIRS include
LIBRARIES velodyne_input)
# compile the driver and input library
add_subdirectory(src/lib)
add_subdirectory(src/driver)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(FILES nodelet_velodyne.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
install(PROGRAMS src/vdump
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
roslint_cpp()
if (CATKIN_ENABLE_TESTING)
# these dependencies are only needed for unit testing
find_package(roslaunch REQUIRED)
find_package(rostest REQUIRED)
# Download packet capture (PCAP) files containing test data.
# Store them in devel-space, so rostest can easily find them.
catkin_download_test_data(
${PROJECT_NAME}_tests_class.pcap
http://download.ros.org/data/velodyne/class.pcap
DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/tests
MD5 65808d25772101358a3719b451b3d015)
catkin_download_test_data(
${PROJECT_NAME}_tests_32e.pcap
http://download.ros.org/data/velodyne/32e.pcap
DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/tests
MD5 e41d02aac34f0967c03a5597e1d554a9)
catkin_download_test_data(
${PROJECT_NAME}_tests_vlp16.pcap
http://download.ros.org/data/velodyne/vlp16.pcap
DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/tests
MD5 f45c2bb1d7ee358274e423ea3b66fd73)
# unit tests
add_rostest(tests/pcap_node_hertz.test)
add_rostest(tests/pcap_nodelet_hertz.test)
add_rostest(tests/pcap_32e_node_hertz.test)
add_rostest(tests/pcap_32e_nodelet_hertz.test)
add_rostest(tests/pcap_vlp16_node_hertz.test)
add_rostest(tests/pcap_vlp16_nodelet_hertz.test)
# parse check all the launch/*.launch files
roslaunch_add_file_check(launch)
# unit test
catkin_add_gtest(time_test tests/timeconversiontest.cpp)
target_link_libraries(time_test
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${PCAP_LIBRARIES})
endif (CATKIN_ENABLE_TESTING)
UPDATE: Resolved the above issue. It was related to target_link_libraries where we need to provide the "target" and not the "project". I updated the cmake by adding this line:
set(libpcap_LIBRARIES ${PCAP_LIBRARIES})
Now, the build fails at 59% with following error:
C:\opt\ros\noetic\x64\include\diagnostic_updater/update_functions.h(188): error C2589: 'constant': illegal token on right side of '::'
Looks like this is an open issue: https://github.com/ms-iot/ROSOnWindows/issues/280
I'm happy to see that you are using ROS on Windows! I'd love to know more about your project.
We (Azure Edge Robotics, who maintain ROS on Windows) don't currently have a Velodyne lidar, so have not attempted to port it.
It looks like the Velodyne Lidar ROS node has not been enabled on Windows. It looks like there are several linux specific commands in the cmake file which need windows equivalents.
We have a porting guide for Windows here - https://ms-iot.github.io/ROSOnWindows/GettingStarted/PortingANode.html
It there is a winpcap vcpkg which can be leveraged in the port:
https://github.com/microsoft/vcpkg/tree/master/ports/winpcap
I've created this on the ROSonWindows github to track:
Catkin_make on the velodyne drivers fails in the windows 10 environemnt

Unexpected path to libprotocd.lib after add gRPC::grpc++ library dependence in CMake

I have a gRPC 1.23.0 compiled by conan(and all dependencies also resolved by conan).
And I have a CMake project, that use grpc library:
set (LIB_DEPS
protobuf::libprotobuf
gRPC::grpc++
)
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIB_DEPS})
When I generate a VS project from this CMakeLists.txt in Linker - Input - Addition Dependencies property, I have there next value:
C:\.conan\data\protobuf\3.9.1\kpa_conan\stable\package\b786e9ece960c3a76378ca4d5b0d0e922f4cedc1\lib\libprotobufd.lib <-- (1)
C:\.conan\data\grpc\1.23.0\kpa_conan\stable\package\d85cccdf40588ac852bd1445d45838487543194f\lib\grpc++.lib
libprotocd.lib <-- (2)
libprotobufd.lib <-- (3)
C:\.conan\data\grpc\1.23.0\kpa_conan\stable\package\d85cccdf40588ac852bd1445d45838487543194f\lib\grpc.lib
C:\.conan\data\grpc\1.23.0\kpa_conan\stable\package\d85cccdf40588ac852bd1445d45838487543194f\lib\gpr.lib
C:\.conan\data\c-ares\1.15.0\kpa_conan\stable\package\b786e9ece960c3a76378ca4d5b0d0e922f4cedc1\lib\cares.lib
C:\.conan\data\grpc\1.23.0\kpa_conan\stable\package\d85cccdf40588ac852bd1445d45838487543194f\lib\address_sorting.lib
wsock32.lib
kernel32.lib
(1) - expected valid path, that I add in CMakeLists.txt
(2),(3) - unexpected and invalid path, that added by gRPC::grpc++ in CMakeLists.txt.
If I change gRPC::grpc++ to gRPC::grpc, lines (2) and (3) will disappear, but path to grpc++.lib will disappear too, but I need it.
How to avoid this strange invalid path to libprotocd.lib and libprotobufd.lib?
To properly link against grpc targets you can use:
target_link_libraries(${PROJECT_NAME} PUBLIC CONAN_PKG::grpc)
This should contain everything required.
More details on this approach here: https://docs.conan.io/en/latest/integrations/build_system/cmake/cmake_generator.html#targets-approach
I have found workaround solution:
find_library(GRPC_GRPC++_LIBRARY NAMES grpc++)
set (LIB_DEPS
protobuf::libprotobuf
gRPC::grpc
${GRPC_GRPC++_LIBRARY NAMES}
)
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIB_DEPS})
And opened the issue about it in gRPC repository: https://github.com/grpc/grpc/issues/20578

OpenCV and VisualStudio 2010 dll problems

Hi everyone I would like to try the openCV library but I have some problems setting up the environment.
From the property Manager I created a new sheet and set:
VC++ Directories :
- Include Directories: $(OPENCV_DIR)\build\x86\vc10\bin and $(OPENCV2_DIR)\build\include
- Library Directories: $(OPENCV2_DIR)\build\x86\vc10\lib;
C/C++ :
- Additional Includes Directories: $(OPENCV2_DIR)\include;
Linker:
opencv_calib3d244d.lib opencv_contrib244d.lib opencv_core244d.lib
opencv_features2d244d.lib opencv_flann244d.lib opencv_gpu244d.lib
opencv_haartraining_engined.lib opencv_highgui244d.lib
opencv_imgproc244d.lib opencv_legacy244d.lib opencv_ml244d.lib
opencv_nonfree244d.lib opencv_objdetect244d.lib opencv_photo244d.lib
opencv_stitching244d.lib opencv_ts244d.lib opencv_video244d.lib
opencv_videostab244d.lib
-Additional Library Directories: $(OPENCV2_DIR)\libs
I can compile but i can't execute the program because I get an error opencv_core242.dll is missing.
Where's my error? Thanks
"I get an error opencv_core242.dll is missing"
if you linked against the libs in opencv\build\x86\vc10\lib (your compiler/linker settings look ok),
you'll have to append
opencv\build\x86\vc10\bin
to your PATH environment variable, so your exe can find the dlls at runtime.

Resources