MASM - declaring external dependancy only when symbol is used



hi, i'm solving same problem for MASM as mentioned here for NASM:
http://www.asmcommunity.net/board/index.php?topic=25983

I need to create library header. Library exports some procedures and
data. In header, I declare procedures using "PROTO" and symbols using
"EXTERN symb:NEAR".

But I want only symbols which are actually used, to be listed as
external dependency in object file. Otherwise unused stuff gets linked
in.

PROTO works just like i want, no problem there. But EXTERN creates
dependency even when symbol is not used.

Is there some way to declare external data, that only creates
dependency if it is used?

thanks in advance

.



Relevant Pages

  • Re: MASM - declaring external dependancy only when symbol is used
    ... I need to create library header. ... I declare procedures using "PROTO" and symbols using ... "EXTERN symb:NEAR". ... PROTO works just like i want, ...
    (alt.lang.asm)
  • extern "C" ignored?
    ... I add some additional dependency to some C library. ... The header file ... found that the compiler seems ignored these "extern C" mark. ... The linker report: ...
    (microsoft.public.dotnet.languages.vc)