cancel
Showing results for 
Search instead for 
Did you mean: 

How to use WinGW + GCC + Cmake compile link STemWin STemWin532_CM4_OS_GCC.a

PCook.1
Associate

185/5000

Win10 system using the CLion IDE, in the compilation environment of WinGW, using Cmake and arm-none-eabi-gcc toolchain compilation connection static library stemwin532_cm4_os_gcc. a,

CMake Error at CMakeLists.txt:68 (target_link_libraries):

"Cannot specify link libraries for target "demo" which is not built by this project."

mingw32-make.exe: *** [cmake_check_build_system] Error 1

1 REPLY 1
PCook.1
Associate

my Cmakelist

This file is generated by STM32CubeMX.

link_directories(STemwin/Include)

link_libraries(STemwin/GUI_Lib)

add_executable(${PROJECT_NAME}.elf ${SOURCES} ${LINKER_SCRIPT})

target_link_libraries(${PROJECT_NAME} STemWin532_CM4_OS_GCC.a)

Is the library available only under Linux?