LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Compilation fails--looking for old directory

Hello,

I'm very frustrated by this phenomenon. I moved my CVI project to a new directory and while compiling it, it seems that it still looking for files in the old one.

The specific dll fails to find the functions of another dll. When I do CTL+i on it, it tries to find it in the old directory.

I checked everything that came to my mind. Recompiled everything, checked the 'Search directories' in the environment setup and nothing. The old directory is not mentioned anywhere. What am I missing? Where else should I look for it?

Thanks
Rafi
0 Kudos
Message 1 of 4
(3,092 Views)
How did you move the project to a new directory? If you load the original project, from the project window, go to File >> Save Project As..., it will update links to files that Windows Explorer does not.

In the project window, go to View >> Show Full Path Names, then stretch out the Names column to see where the .lib files is being loaded from. If the .lib is still being loaded from the old directory, right-click on the .lib and select Replace File in Project and browse to the new directory.

How many layers do you have in your project? .exe calls .dll 1 which calls .dll 2? Are the functions you can't find in .dll 1 or .dll 2? You may need to rebuild .dll 1.
0 Kudos
Message 2 of 4
(3,088 Views)
Thanks Al,
 
My project was looking for *.c and *.h files in the old directory.  After doing  'Save Project As..."  is still looked for them.  However, it compiled the source.  When I ran the *.exe file it was still looking for files in the old directory. However, it ran the application.  The problem was solved when I exit CVI completely and loaded it again.  Do you think this is because I had done 'Save project As..." before exiting?
 
Another issue.....My program also uses   ..\TestStand 3.5\API\CVI\tsapicvi.fp  and   tsutil.fp.    I copy the application to another PC where TS is installed in a different directory such as   ....\TestStand\API\CVI\tsadpicvi.fp.   Obviously, the files are not found.  Any suggestions how to make the application compiled/run smoothly on both computers?
 
Thanks
Rafi
 
0 Kudos
Message 3 of 4
(2,963 Views)
Howdy Rafi,
 
You might consider making some of your CVI files based upon a relative path. To do this, those files need to be in certain directories.  You can also see which files to make relative by selecting Edit >> Project... when the Project Tree is active. From there, you notice a little checkbox entitle Use Absolute Path for File which forces LabWindows/CVI to store the file path as an absolute path in the project file, rather than a path relative to the project when you load this project file from a different location. 
 
Hope this helps!
 
Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 4 of 4
(2,949 Views)