L
L
lightalex2020-01-29 23:08:20
C++ / C#
lightalex, 2020-01-29 23:08:20

How to add a DLL search directory for a C++ project in VIsual Studio?

Good day!
There is a C++ project in VIsual Studio . It contains several DLLs. They are connected implicitly through LIB. Now all the DLLs are in the root of the project being built (next to the exe) and everything works fine. But there is a need to transfer all DLLs to a separate directory (for example, let it be libs).
The question is how to do it? How to add DLL search directories or how to register links to these same DLLs?
I found only one way - to set directories with DLLs through Project Properties -> Debugging. But the problem is that all this only works to run the program from the VS environment. If you just compile the EXE and run it, the DLL still doesn't find it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir S, 2020-01-30
@lightalex

SetDllDirectoryA

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question