Building dynamic lib with ROOT dependencies by CMAKE in widows is failed

Hi,
I want to build daynamic lib with root dependencies by cmake in widows, but it’s fialed.
The minGW64 version is 8.1. The cmake file is following:

cmake_minimum_required(VERSION 3.20)
 
 PROJECT(PCHLIB)
 #set(ROOT_DIR "C:/root/cmake")
#find_package(ROOT "6.28" REQUIRED)
#set(INC_ROOT ${ROOT_INCLUDE_DIRS})
#set(LIB_ROOT ${ROOT_LIBRARY_DIR})
 #$ROOTSYS/etc/cmake/FindROOT.cmake
find_package(ROOT REQUIRED)

set(CMAKE_CXX_FLAGS "${ROOT_CXX_FLAGS}")

include(${ROOT_USE_FILE})
include_directories(${ROOT_INCLUDE_DIRS})
link_directories(${ROOT_LIBRARY_DIR})

 SET(SRC pch.cpp)
 
 ADD_LIBRARY(pch SHARED  ${SRC})
SET(LIBRARY_OUTPUT_PATH  ${PROJECT_BINARY_DIR}/lib)

The output is following:


How can I fix it? Thanks!

_ROOT Version:6.28
_Platform: widows
_Compiler:cmake 3.26


minGW64 is not supported, only native build with Visual Studio

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.