flat assembler
Message board for the users of flat assembler.
Index
> Windows > "unused" import removed (bug or optional?) |
Author |
|
revolution 26 Jan 2012, 10:55
matefkr wrote: I think it removes all "unused" imports, is there any way to disable that? |
|||
26 Jan 2012, 10:55 |
|
matefkr 26 Jan 2012, 11:34
what would be 1? true?
|
|||
26 Jan 2012, 11:34 |
|
revolution 26 Jan 2012, 11:37
1 == always used. Then every import would appear in the section regardless of its actual use.
But an alternative solution to what you asked for would be to actually make it used, and still have the macros remove all the other unused imports. Code: virtual invoke TheAPIiWantToUse,0 end virtual |
|||
26 Jan 2012, 11:37 |
|
matefkr 26 Jan 2012, 11:43
i get it, the statement in the if is normally a result of a logical statement. if i put in just 1 it equals true.
anyway, its a hacked together thing. im just tryng necessary building for later program. it crashes now. i attach file (i want to realloc memory for me, if i need more. thats for a test if ican do reallocation). EDIT: among other things, the problem was that messageboxa screwed up ecx, and left it like that.
|
|||||||||||
26 Jan 2012, 11:43 |
|
l_inc 26 Jan 2012, 21:44
matefkr
For the future, if you need to prevent ignoring unused imports, you should just refer the symbols somehow. I'd suggest you to use something like this: Code: ;refers a symbol, so that used-directive returns true ;e.g., allows to prevent omitting unused imports macro refer [arg*] { times arg-arg } E.g., if you need to add statical dependencies on let's say ws2_32.dll and comctl32.dll (which is a common situation) without calling their functions, you just need to write: refer WSAStartup,InitCommonControls. Of course you also should have them (explicitly or implicitly) described in your import directory. |
|||
26 Jan 2012, 21:44 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.