Add DLL directory to PATH at Debug/Run time

I apologize for such a newbie question but I can't figure out how to add a library path at debug time.

I've got a simple hello world app that links with a dll that is not on my global environment %PATH%.
If I include the directory of the dll on my %PATH% I can run the compiled executable from the command line. (And clion if I restart)

But I can't find a way to modify the path from the Debug Configuration.

I tried editing the Debug Configuration -> Environment variables with %PATH%;<DLL PATH>, but the getenv still prints my system environment %PATH%. I tried unchecking "Include parent environment variables" but now all I see is <MinGW Path> when I print getenv("PATH")

Any idea on how I can include my DLL path without resorting to modifying my global environment?

Please sign in to leave a comment.