Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: 4ggr35510n on March 12, 2012, 04:53:22 pm

Title: Add dll search directory to C::B project
Post by: 4ggr35510n 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!
Title: Re: Add dll search directory to C::B project
Post by: Alpha on March 14, 2012, 03:16:44 am
See if the Environment Variables plugin (http://wiki.codeblocks.org/index.php?title=Environment_Variables_plugin) has the features you are looking for.
Title: Re: Add dll search directory to C::B project
Post by: ptDev 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.