flat assembler
Message board for the users of flat assembler.
Index
> Windows > GTK and FASM |
Author |
|
dieboy 02 Jan 2005, 12:57
Have you got any examples? I want to programming in FASM using GTK+ (under Windows), but I don't know how.
_________________ ... |
|||
02 Jan 2005, 12:57 |
|
dieboy 02 Jan 2005, 16:02
Yeah, but FASM for win doesn't support:
public extrn, etc. Can you give me any example for windows? _________________ ... |
|||
02 Jan 2005, 16:02 |
|
crc 02 Jan 2005, 18:48
You'd have to import the gtk dll's and functions you want to use.
|
|||
02 Jan 2005, 18:48 |
|
dieboy 02 Jan 2005, 19:08
crc wrote: You'd have to import the gtk dll's and functions you want to use. I found ~6dll's, but I don't know, in which dlls are that functions, what i need. _________________ ... |
|||
02 Jan 2005, 19:08 |
|
JohnFound 02 Jan 2005, 19:59
1. Native documentation of GTK - there MUST be such.
2. If you can't find it or there is nothing about Windows programming (possible), then PEBrowse Pro is the answer of your question. I hope you will post some examples when you have success with this good deed. Regards. |
|||
02 Jan 2005, 19:59 |
|
dieboy 03 Jan 2005, 18:25
If I will write something, of course, I'll show you some examle/s
_________________ ... |
|||
03 Jan 2005, 18:25 |
|
dieboy 03 Jan 2005, 19:04
Hi! I wrote this example, but when i run him, I have error(standard winxp error window), this is code:
Code: format PE GUI 4.0 entry main include '%fasminc%\win32a.inc' section '.data' data readable writeable hWindow dd ? section '.code' code readable executable main: invoke gtk_init, eax, ebx invoke gtk_window_new, 0 ;GTK_WINDOW_TOPLEVEL = 0 invoke gtk_widget_show, [hWindow] invoke gtk_main section '.idata' import data readable library kernel, 'KERNEL32.DLL',\ libgtk, 'libgtk-win32-2.0-0.dll' import kernel,\ ExitProcess, 'ExitProcess' import libgtk,\ gtk_widget_show, 'gtk_widget_show',\ gtk_init, 'gtk_init',\ gtk_window_new, 'gtk_window_new',\ gtk_main, 'gtk_main',\ And if I use: Code: proc main, argc, argv .... I have error(FASM): if use main _________________ ... |
|||
03 Jan 2005, 19:04 |
|
JohnFound 03 Jan 2005, 19:50
Well this works (at least partially) for me.
The only problem is that my GTK dll's are located in "Program Files/Common files/GTK/bin" and the program can't find them. So, I simply copied the .exe to this directory in order to check it and it works. Of course this is not a solution. Code: format PE GUI 4.0 entry main include '%fasminc%\win32a.inc' section '.data' data readable writeable hWindow dd ? section '.code' code readable executable main: invoke gtk_init, 0, 0 invoke gtk_window_new, 0 ;GTK_WINDOW_TOPLEVEL = 0 mov [hWindow], eax invoke gtk_widget_show, [hWindow] invoke gtk_main section '.idata' import data readable library kernel, 'KERNEL32.DLL',\ libgtk, 'libgtk-0.dll' import kernel,\ ExitProcess, 'ExitProcess' import libgtk,\ gtk_widget_show, 'gtk_widget_show',\ gtk_init, 'gtk_init',\ gtk_window_new, 'gtk_window_new',\ gtk_main, 'gtk_main' Regards. |
|||
03 Jan 2005, 19:50 |
|
vid 03 Jan 2005, 21:32
Quote:
aren't there .o files of GTK? You could compile to COFF and link it no? |
|||
03 Jan 2005, 21:32 |
|
crc 04 Jan 2005, 04:19
Why should you need to compile GTK as COFF and use a linker when you can use the DLL's without to much hassle? (Compiling GTK as COFF would require GCC, LD (with COFF support), and many of the binutils; not fun to set up...)
|
|||
04 Jan 2005, 04:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.