For errors:
CMake Error at D:\VSA_paper\VSA\CMakeLists.txt:48 (target_link_libraries): 1> [CMake] Cannot specify link libraries for target “variational” which is not built by this project.
All the information found said target_link_libraries is not placed behind add_executable, but not mine
the following is the code segment where the error is located
add_executable(${PROJECT_NAME}_bin ${SRCFILES} ${HEAD_FILES} ${RCC_FILES} ${WRAP_FILES} "gauss.h" "developable_degree.h")
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Core Qt5::Gui)
target_link_libraries(${PROJECT_NAME}_bin igl::core igl::opengl_glfw)
target_link_libraries(${PROJECT_NAME}_bin OpenMesh)
From the error “Cannot specify link libraries for target “variational” which is not built by this project.” You can see that the project name “variant” is wrong and should be “variant_bin”.
The solution is to add the missing “_bin” after ${project_name} in the above code segment. The modified result is as follows:
add_executable(${PROJECT_NAME}_bin ${SRCFILES} ${HEAD_FILES} ${RCC_FILES} ${WRAP_FILES} "gauss.h" "developable_degree.h")
#add Qt5
target_link_libraries(${PROJECT_NAME}_bin Qt5::Widgets Qt5::Core Qt5::Gui)
target_link_libraries(${PROJECT_NAME}_bin igl::core igl::opengl_glfw)
target_link_libraries(${PROJECT_NAME}_bin OpenMesh)
Read More:
- [Solved] target_link_libraries error: a missing vtable usually means the first non-inline virtual member function has no definition.
- [Solved] CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
- [Solved] error: external/googletest/googletest: MODULE.TARGET.STATIC_LIBRARIES.libgtest already defined
- [Solved] pytorch CrossEntropyLoss Error: RuntimeError: 1D target tensor expected, multi-target not supported
- [Solved] ./my_cmake_exe: error while loading shared libraries: libswresample.so.4: cannot open shared object file: No such file or directory
- [Solved] cmake: symbol lookup error: cmake: undefined symbol: _ZN4Json5ValueC1ERKSs
- [Solved] RK3399 Compile UBOOT Error: No rule to make target , needed by
- [Solved] CMake Error: The current CMakeCache.txt directory is different than xxx
- [Solved] NO ST-LINK detected/ST-LINK USB communication error
- How to Solve Element Error: target is not existed: .page-component__scroll .el-scrollbar__wrap
- Cmake Error The C compiler identification is GNU 7.5.0 — The CXX compiler identification is unknown
- [Solved] QT cmak Compile Error: CMake Error: The source.. does not match the soused
- [Solved] CMake Error: Could not create named generator Visual Studio 16 2019
- [Solved] CMake Error: Could not create named generator Visual Studio 16 2019 -A Win64
- [Solved] Mac Cmake Complie openmp Error: fatal error: ‘omp.h‘ file not found
- [Solved] Opencv Compile Error: (CMake Error: The following variables are used in this project, but they are set to not)
- [Solved] error MSB3073: CMake that the project does not need compatibility with older versions.
- [Solved] Could not find a package configuration file provided by “moveit_core“
- CMake Error: The source directory “opencv Install Catalog“ does not appear to contain CMakeLists.txt.
- CCS Error: gmake: Target ‘all‘ not remade because of errors.