Author Topic: Add dll search directory to C::B project  (Read 4531 times)

Offline 4ggr35510n

  • Single posting newcomer
  • *
  • Posts: 4
Add dll search directory to C::B project
« on: March 12, 2012, 04:53:22 pm »
Greetings!

How can I add to C::B project information about directory of .dll used by program?

For example: default wxWidgets project contains info about directory of wxmsw293u_gcc_custom.dll (if build as shared and monolithic). If not executed by C::B, the Windows will return error ".dll not found".

One solution is to add all needed .dll's into system directory. Of course it's messy.

How can I simply add information about other .dll's I'm using?

Thanks in advance for your answers!
Best regards!

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Add dll search directory to C::B project
« Reply #1 on: March 14, 2012, 03:16:44 am »
See if the Environment Variables plugin has the features you are looking for.

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Add dll search directory to C::B project
« Reply #2 on: March 14, 2012, 08:00:07 am »
It works when running from C::B because the lib location is (temporarily) added to your PATH. Either copy the DLL to the output folder of your executable (you can add a post-build step that does that in the project build options), or add the folder with the DLL to the system PATH yourself (less dirty than copying it to the system folder). Personally, I prefer the first option.