How to use a dylib created in Swift in a C++ file

  c++, dylib, macos, swift, xcode

i have written a function in a swift file that I want to use in my C++ file, I know the concept of bridging header but I am noob in terms of Swift, so please can anyone help me.
this is what I wrote in the swift file:

func sum(_ x:Int,_ y:Int)->Int{return x+y}

I want to use this in the C++ file but I don’t know how to implement it.

Source: Windows Questions C++