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

Modules in a static library

rahzan
New Contributor I
412 Views
What special considerations exist for putting a module inside a lib?

I have a module which works fine when included as sourse code in various projects but when I try to put it in a lib file and add the lib file to the source files I get various link errors which were not there before.

The Mod file has been copied to the INCLUDE directory.

in one case only two routines (out of a set of very large number in the module) are picked on, as being unresolved and are being looked for by different decoartions

LNK2001: unresolved external symbol _AUTOARRAYS_mp_AA_SORT@4
&
LNK2001: unresolved external symbol _AA_RESET@4

In another case I get the ol' mysterious:
arning LNK4098: defaultlib "libc.lib" conflicts with use of other libs; use /NODEFAULTLIB:library

Any hints will be appreciated.
Tx,
TimH
0 Kudos
1 Reply
Steven_L_Intel1
Employee
412 Views
There are no special considerations, but it sounds as if your library is not being searched by the executable project, or the module is not being USEd. If you send a ZIP archive of your workspace to us at vf-support@compaq.com, we can tell you what's wrong.

You must make sure also that the run-time libraries setting is the same for your library and your main project.

Steve
0 Kudos
Reply