Modules in a static library

Modules in a static library

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

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today