Setting Library path for win32 console applications

后端 未结 4 1780
梦如初夏
梦如初夏 2021-01-03 10:55

I am getting \"dll not found:restarting the application may fix the problem\" error when i try to execute a simple \"HelloWorld\" win32 console application. I know the locat

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-03 11:24

    From: http://msdn.microsoft.com/en-us/library/7d83bc18.aspx

    With both implicit and explicit linking, Windows first searches for "known DLLs", such as Kernel32.dll and User32.dll. Windows then searches for the DLLs in the following sequence:

    1. The directory where the executable module for the current process is located.

    2. The current directory.

    3. The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.

    4. The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.

    5. The directories listed in the PATH environment variable.

提交回复
热议问题