flat assembler
Message board for the users of flat assembler.
Index
> Windows > Using GCC (ld.exe) linking issue |
Author |
|
HaHaAnonymous 10 Dec 2012, 22:29
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:12; edited 1 time in total |
|||
10 Dec 2012, 22:29 |
|
revolution 11 Dec 2012, 00:38
For a linkable Windows output (an object file) you would use either "format coff" or "format ms coff".
|
|||
11 Dec 2012, 00:38 |
|
HaHaAnonymous 11 Dec 2012, 00:52
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:12; edited 1 time in total |
|||
11 Dec 2012, 00:52 |
|
khatch 22 Dec 2012, 14:39
Hello.
The answer is: Code: format ELF ;include 'win32a.inc' extrn '__imp__MessageBoxA@16' as MessageBox:dword extrn '__imp__ExitProcess@4' as ExitProcess:dword ; extrn '_myInfoBox@4' as myInfoBox:dword extrn ___main ; ; for mingw32 section '.data' writeable title db 'Title',0 info db 'Testing String',0 section '.code' executable writeable ; public _WinStart ; _WinStart: include 'win32a.inc' public _main _main: call ___main ; for mingw32 invoke MessageBox, 0,info,title,0 ; push info ; call myInfoBox invoke ExitProcess, 0 And then: gcc main.o -o final_GUI.exe -Wl,--subsystem=windows gcc main.o -o final_CONSOLE.exe -Wl,--subsystem=console _________________ Jesus Christ is our Savior |
|||
22 Dec 2012, 14:39 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.