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.
29284 Discussions

How to make one project depend on another and build solution?

anthonyrichards
New Contributor III
881 Views

I am embarassed to ask this, but I am still new to IVF and I do not know how to combine two seperate projects, one a static library and the other a test console program that uses the library.
I have succeeded in creating two seperate projects, and what looks like two soutions (judging from the .vfproj and .sln files present in the respective folders). The library builds ok with no errors.

The test program compiles OK but will not build because of unsatisfied externals as aresult of not being pointed to the library created by the first project.

However, when I try and find a way of making the test console program project 'depend' on the library, so that it uses the library when linking, I cannot find any link to ' project dependencies' when I try a right-click..properties on the console project in the solution explorer pane. I just get the configuration manager.
How can I get the two projects to work together?

Well, I added the library as an 'existing item' by right-clicking the test project in solution explorer. That way the library was certainly found, and the project linked OK and the program ran OK. However, this is not the recommended way of building project dependencies I believe?

0 Kudos
4 Replies
Jugoslav_Dujic
Valued Contributor II
881 Views
The simplest (and IMO recommended) way is to include both projects in the same solution, and make the .exe dependent on .lib (right-click on the .exe project and select "Project Dependencies").

The other way, as in CVF, is to modify Project/Properties/Linker/Input/Additional dependencies and/or .../General/Additional Library Directories.

The third one is to include the .lib in the project, which I never particularly liked; your mileage may vary.
0 Kudos
anthonyrichards
New Contributor III
881 Views
Thanks.

So my next question is, "with two apparently seperate projects and solutions, how to add one existing project to another existing project into the same solution"?
0 Kudos
Jugoslav_Dujic
Valued Contributor II
881 Views
Project is a subset (element) of solution. To add a new project to a solution, right-click on the Solution and select "Add/Existing project", then browse for the .vfproj. Before that, you might want to move the whole project folder to the solution directory so as to have everything in one place.
0 Kudos
anthonyrichards
New Contributor III
881 Views
Thanks, JD. But my Solutions were not visible, thanks to the default setting 'make solutions visible' was not checked under Tools...options. Rather bizarre!

A reply to a later post of mine put me straight on what to do to make the solutions visible, thank goodness.
0 Kudos
Reply