I can link a lib. But when the lib link to a c# dll,and then build it. I can complie but the editor will crash when click play.
I guess the engine don’t find the dll.I put the dll and lib in same path.
Nah, I put the dll in the Binaries/Win64 path - this way Editor finds dll in same directory where it finds it’s game. Also, answering your question in the title - I link libraries inside MyProject.Build.cs, adding following lines:
PublicLibraryPaths.Add("../Binaries/Win64");
PublicAdditionalLibraries.Add("library.lib");
(if we assume that library is in ./Project/Binaries/Win64 folder).