Hi all. I've started using CodeLite recently, coming from CodeBlocks, and I'm enjoying it, specially the refactoring tools! Here's a question that I've not found answered in the forum, and needed help with:
I would like to run the program that I've built, but I get the window message "This application has failed to start because <library name>.dll was not found". I know that this means that I haven't specified the path to dll's that I'm linking with. How do I do that?
I'm linking with several dll's, each in its different directory. I've correctly built the executable, specifying the lib*.a for each shared library in Project's "Settings...->Linker->Library Path" and "Libraries". The Dll for each library is in the same directory as its "lib*.a file" (this was enough for CodeBlocks to find the dll file when attempting to run the program).
Can anyone help? Thanks in advance
Specify DLL Library path
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Mon Sep 27, 2010 2:51 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Specify DLL Library path
The best way to do that is:
'settings -> environment variables'
and add to the workspace environment variables (if you never touched that, then it should be the 'Default' one) the following line:
(ofc, replace \Path\To\My\Dlls with the actual path)
Eran
'settings -> environment variables'
and add to the workspace environment variables (if you never touched that, then it should be the 'Default' one) the following line:
Code: Select all
PATH=\Path\To\My\Dlls;$(PATH)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Mon Sep 27, 2010 2:51 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Specify DLL Library path
Brilliant, that worked perfectly!
Have you considered/are you considering letting the user specify environment variables by workspace/project instead of globally? I think that might be useful.
Thanks for the help and for creating CodeLite!
Have you considered/are you considering letting the user specify environment variables by workspace/project instead of globally? I think that might be useful.
Thanks for the help and for creating CodeLite!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Specify DLL Library path
right click on your workspace and select 'Workspace Setting -> environment'TurboLento wrote:Have you considered/are you considering letting the user specify environment variables by workspace
This is already implemented in trunk version, each project (actually each project configuration) can use a different set of environment variables (and debugger predefined types)TurboLento wrote:project instead of globally?
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Mon Sep 27, 2010 2:51 am
- Genuine User: Yes
- IDE Question: c++
- Contact:
Re: Specify DLL Library path
Fantastic! Thanks for the help!