flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 04 Feb 2004, 19:06
Hm, why you actually need to have import section in every source file. Isn't it more easy to have only one import section importing everything from FASM import include files and to leave FASM to determine what to include in import section of your program. Note, that standard import macroses of FASM will not import not used functions.
I use following code in Fresh and now I am happy with it because I don't need to enumerate every used function in import section and to cleanup after some editing of the program. It will cost you only about 1 second compilatin time. Code: section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL', \ gdi32,'gdi32.dll', \ comctl32,'comctl32.dll',\ comdlg32,'comdlg32.dll',\ shell32, 'shell32.dll', \ ole32, 'ole32.dll' include '%finc%\win32\apia\kernel32.inc' include '%finc%\win32\apia\user32.inc' include '%finc%\win32\apia\gdi32.inc' include '%finc%\win32\apia\ComCtl32.inc' include '%finc%\win32\apia\ComDlg32.inc' include '%finc%\win32\apia\Shell32.inc' include '%finc%\win32\apia\ole32.inc' |
|||
![]() |
|
Vortex 04 Feb 2004, 19:54
jInuQ,
Is it a problem concerning linkers? _________________ Code it... That's all... |
|||
![]() |
|
jInuQ 04 Feb 2004, 23:23
Well at first it was for .data sections so that I don't have to have a ton of data sections.
_________________ jInuQ "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint Exupery |
|||
![]() |
|
JohnFound 05 Feb 2004, 01:41
jInuQ wrote: Well at first it was for .data sections so that I don't have to have a ton of data sections. Well, for data sections there is completly different solution. You need "globals.inc" library from Fresh project. Simply read Decard's file freshguide.chm from Fresh package (It is included in the latest work version) or from here: http://board.flatassembler.net/topic.php?t=883 There are descriptions and example of use for this macro library. Regards. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.