Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Specifying the location of a DLL

jond
Novice
635 Views
I am trying to write a console main program to debug an IVF dll. The IVF help files say that I either need to specify the location of the dll in the path environment variable or copy the dll into the solution folder of the console main program. Since this is just a test case for me for learning purposes, I don't want to modify and clutter the path environment variable. The latter option, copying the dll into the solution folder for the console application, needs to be done everytime I re-compile the dll during the debugging process. Is there another way, a more project-dependent alternative to these two possibilities? For instance, I can specify the directories for include and library files in the Project Properties. Can the same thing be done for dll directories?

By the way, I tried to add the dll project into my solution and specified that the console project depends on the dll project. This didn't help since I kept getting the "Unable to locate component" message.

Thanks for any help,
Jon
0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
635 Views
The best way to solve .exe/.dll locations is to tweak "Output directory" in Project/Properties/General, preferrably using a relative path. I typically set both .exe's and .dll's directory to "..Bin", i.e. both will go to "Bin" directory which is on the same level as their project directories, but you can use another scheme.

I vaguely recall there were some problems with using Visual Studio's "Dependency" feature in older versions of VF. Steve might provide the details. You can workaround it by explicitly linking with the dll's import library though.
0 Kudos
Steven_L_Intel1
Employee
635 Views
I'm going to disagree with Jugoslav here - for one reason. if you have two projects with the same output directory, if you rebuild one you wipe out the other. Instead, change the path for the Linker output, or add a post-build step that copies the DLL.

The only problem with project dependencies I know of is if the main project is C/C++ and you're using VS2005 without SP1, it won't link in dependent non-C/C++ library projects.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
635 Views
I'm going to disagree with myself and agree with you Steve Smiley with tongue out [:-P]. I made a mix-up when posting--changing the Linker output is indeed the correct venue. Not so sure about the copying in the post-build step--offhand, it may seem to affect debugging, but when I think about it, it shouldn't.


0 Kudos
Reply