Software Archive
Read-only legacy content
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.
17060 Discussions

Mod file Lost in space!

rahzan
New Contributor I
629 Views
I did a cvf project and within it I wrote a module which can be used by other projects. I assumed that if I put its MOD (and to be safe its f90) file(s) in the DF98INCLUDE I can gain access to it in another project by simply putting in a USE stmt. However, while the new project compiled and the MOD appears in the "external dependencies" list, there are unresolved externals errors during the LINK stage. The link errors explicitly refer to the routines in the MOD file mentioned.

Why does it not recognize the contents of the MODule??
Is it because it was compiled as part of another project? or...

thanks, Tim H
0 Kudos
1 Reply
Steven_L_Intel1
Employee
629 Views
You must also add to the project the .LIB or .OBJ files from the project that defines the modules. The easiest way to do this is to make the module project a "static library" project type and then to make that project a dependent of your main project. The library will then automatically be linked in - you still need to modify the INCLUDE path, however.

The .MOD has the declaration of the routines and variables - the actual code and storage is in the .OBJ/.LIB.

Steve
0 Kudos
Reply