Advertisement

05.05.2008 at 09:18AM PDT, ID: 23376838
[x]
Attachment Details

How to set VS 2008 DLL path

Asked by pmartino99 in Visual Studio .NET 2005, Microsoft Visual C++.Net

Tags: Visual C++

I want to know how to point VS 2008 (or 2005) to a custom DLL path:  
1. I create a DLL (my.dll) for common symbols, helper functions.
2. I put the dll in C:\mydlls and add that path to the system PATH variable.
3. I create an application to use that dll.  It launches fine when OUTSIDE of VS (i.e. exe is double-clicked).  
4. It fails to launch when I hit 'Start Debugging' OR 'Start Without Debugging' in VS 2008 with the error 'failed to start because my.dll was not found...'.
5. I added the dll path to the VC++ Directories (I tried Executable, Include, Library, Reference, Source) under Tools | Options and it did NOT fix the problem.
6. One way to fix it is to put the dll in c:\windows\system32.

So I need to know how I can modify the DLL path for Visual Studio.  It obviously has 'c:\windows\system32' in there already... how/can I add 'c:\mydlls'.  I would rather keep them in 1 directory rather than have multiple versions, etc.  I do NOT want to have to copy it into the Debug/Release folder of the app I'm working on, that is just dumb.

BTW I am loading the DLL implicitly, NOT explicitly using LoadLibrary.  I use the functions throughout the code so I think this is best (rather than a one and done scenario).Start Free Trial
[+][-]05.06.2008 at 03:44AM PDT, ID: 21506107

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 05:29AM PDT, ID: 21506633

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 07:05AM PDT, ID: 21507365

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 07:08AM PDT, ID: 21507391

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 08:31AM PDT, ID: 21508165

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio .NET 2005, Microsoft Visual C++.Net
Tags: Visual C++
Sign Up Now!
Solution Provided By: pmartino99
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628