Author Topic: Missing DLL  (Read 3966 times)

Offline LarsPensjo

  • Single posting newcomer
  • *
  • Posts: 9
Missing DLL
« on: February 02, 2012, 10:18:25 pm »
I am running C::B in a Windows environment with MinGW. When I try to execute the compiled application from inside of C::B, I get an error message of missing DLLs. These are located here and there in the MinGW hierarchy.

How do I tell Code::Blocks where to look for DLLs?

I have seen the suggestion that I copy the DLLs to my current working direktory. I prefer not to do this.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Missing DLL
« Reply #1 on: February 02, 2012, 10:25:53 pm »
"Settings->Compiler and Debugger->Global Compiler settings->Toolchain executables"

Put path to DLLs in "additional paths" under "Tool chain executable"

Note: The above method is NOT recommend; copying the DLLs is the recommend method.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline LarsPensjo

  • Single posting newcomer
  • *
  • Posts: 9
Re: Missing DLL
« Reply #2 on: February 02, 2012, 10:44:34 pm »
Thanks for the quick answer, that fixed the problem!  :)

I did see this option, but I thought it was for the tool chain configuration.

Why is it a recommended practice to copy the DLLs? My experience from programming is that redundancy and copying should be kept to a minimum. Sooner or later you need to change or update, and then the risk is big that you only update one of the copies.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Missing DLL
« Reply #3 on: February 02, 2012, 10:51:11 pm »
Why is it a recommended practice to copy the DLLs? My experience from programming is that redundancy and copying should be kept to a minimum. Sooner or later you need to change or update, and then the risk is big that you only update one of the copies.

Not really a valid Code::Blocks question; look-up "Dynamic-Link Library Search Order" under windows.

The simplest option that always works is Copying the DLLs; the harder methods are really not a valid topic for this site.

The best method DLL varies based on the DLL; therefore it is not a discussion for this site.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Missing DLL
« Reply #4 on: February 02, 2012, 10:53:42 pm »
I did see this option, but I thought it was for the tool chain configuration.

It is ONLY for that reason; so, when your compiler/project fails to work DO NOT complain to me that it is broken!!!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org