Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: mingw32-make.exe[3]: *** No rule to make target  (Read 2528 times)

0 Members and 1 Guest are viewing this topic.

steelx

  • Newbie
  • *
  • Posts: 3
    • View Profile
mingw32-make.exe[3]: *** No rule to make target
« on: May 23, 2021, 09:24:29 am »
Hi,

Im using CLion on windows. I did not install Cmake externally, just using Clion cmake.

Im trying to build a simple main.cpp file



Code: [Select]
cmake_minimum_required(VERSION 3.19)
project(sfml_01)

set(CMAKE_CXX_STANDARD 20)

add_executable(sfml_01 src/main.cpp)

include_directories(headers /usr/include C:/SFML/include)

set(SFML_ROOT c:/SFML)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML 2.5 COMPONENTS system window graphics network audio REQUIRED)

## If you want to link SFML statically
#set(SFML_STATIC_LIBRARIES TRUE)

if (SFML_FOUND)
    include_directories(${SFML_INCLUDE_DIR})
    target_link_libraries(sfml_01 ${SFML_LIBRARIES} ${SFML_DEPENDENCIES})
endif()

# copy images, sound etc ready to be bundled
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})

# copy DLL's
if (WIN32)
    file(GLOB BINARY_DEP_DLLS "${SFML_ROOT}/bin/*.dll")
    file(COPY ${BINARY_DEP_DLLS} DESTINATION ${CMAKE_BINARY_DIR})
    file(GLOB MINGW_DEP_DLLS "C:/mingw64/bin/*.dll")
    file(COPY ${MINGW_DEP_DLLS} DESTINATION ${CMAKE_BINARY_DIR})
endif ()


it works fine
Code: [Select]
"C:\Program Files\JetBrains\CLion 2020.3.3\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\projects\Cplusplus\sfml_01
-- Found SFML 2.5.1 in /SFML/include
-- Configuring done
-- Generating done
-- Build files have been written to: C:/projects/Cplusplus/sfml_01/cmake-build-debug

[Finished]



but when I try to run the code via PLAY button on top I get following error:
Code: [Select]
====================[ Build | sfml_01 | Debug ]=================================
"C:\Program Files\JetBrains\CLion 2020.3.3\bin\cmake\win\bin\cmake.exe" --build C:\projects\Cplusplus\sfml_01\cmake-build-debug --target sfml_01 -- -j 9
mingw32-make.exe[3]: *** No rule to make target 'C:/libs/SFML/lib/libsfml-network-d.a', needed by 'sfml_01.exe'.  Stop.
« Last Edit: May 23, 2021, 09:34:59 am by steelx »