Undefined Reference - C GCC

I was facing Undefined reference when doing the compilation. I could see no error during the project file compilation in linking stage the error occurred as undefined reference

cmd.exe /C "cd . && C:\Programfiles\gcc\5.1.0\bin\gcc.exe    -shared -o Sample_project\Source_Files\Project.dll -Wl,--out-implib,Sample_project\Source_Files\Project.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\SAE_Proj.rsp  && cd ."
  Sample_project/Source_Files/CMakeFiles/Sampleproject.dir/Load_dll.c.obj:Load_dll.c:(.text+0x166): undefined reference to `__imp_PathRemoveFileSpecA'

My cmakelist.txt

file(GLOB SIL_SOURCES "*.c")
set (SourceFiles ${Sample_sources})

add_library(Sample_project SHARED ${SourceFiles})

target_include_directories (Sample_project PUBLIC $ENV{WINDOWSSDKDIR}/Include)
target_include_directories (Sample_project PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../External_Dependencies)

I am not sure why this error occurred during the linking no in the compilation and the error is related to some windows include file.

You need to link the mentioned library.