LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

import library is going to the wrong directory

I'm running LabWindows/CVI 8.1.0 (Windows XP) with a rather large and complex workspace containing a number of projects. One of my projects apparently got mixed up with another one, and when I generate the debugable dll, the import library gets written to another directory, instead of the same one that the .dll goes to. Of course other code that links to that dll can't find the .lib file, and I have to manually put it where it is supposed to be. I can't find the option that controls this; any help would be appreciated.
0 Kudos
Message 1 of 4
(3,456 Views)

Shouldn't the location of the .lib follow the target settings in the Build pull-down menu?

 

It could be you're not matched on the .lib file you've got in the project to the location in the target settings for the DLL.  Or you're including the release .lib in your debug build not  the debug  .lib

 

This can be really confusing, especially when you also have a release version of the DLL which in turn creates a release version of the import library with separate target settings.  CVI doesn't automatically switch the libraries for you - when you switch the client application build mode from release to debug, you have to ensure that you're building with the appropriate lib file if you intend to debug into the DLL.

 

You have to watch the search path / location of the DLL closely - I've about gone nuts trying to debug a DLL then realizing the client app was picking up the DLL from some unexpected location.  Especially with WinXP which can re-direct the location of the DLL to be loaded.  Several times I've had to go in and brute force rip out every copy, release and debug, of a dll to ensure I was running the one I wanted.

 

Good luck

 

Menchar

Message Edited by menchar on 12-18-2009 12:56 PM
Message Edited by menchar on 12-18-2009 12:56 PM
0 Kudos
Message 2 of 4
(3,454 Views)
Yes, the .lib library should follow the location of the _dbg.dll file, but it doesn't. And, for the life of me, I can't figure out what I might have set to change that in the other project (which settings must have been copied).
0 Kudos
Message 3 of 4
(3,378 Views)

pblase,

 

Have you tried changing the settings for your mixed up project to direct the DLL to another folder?  It would be interesting to see if the import library got created in this new folder or was still created in the incorrect folder.  The only option that should modify the location of the import library is the Import Library Choices dialog that you can get to from the Target Settings dialog.  Make sure both of those checkboxes are unchecked, since that would move the import library to a different folder.

Eric B.
National Instruments
0 Kudos
Message 4 of 4
(3,359 Views)