The command line for my project doesn't work using GTK+, version 3.18, with the Win32 libraries I obtained from the GtkD project. What could be wrong?
That was not an assembly language question. It was not a "How do I compile and link a GTK+ program" question. It was a, "The command line doesn't work using GTK+, version 3.18, using the Win32 libraries I obtained from the GtkD project. What could be wrong?", question. You are apparently not familiar what the assembly language output of GCC or GoAsm could be, so why are you offering advice on it? John posted the disassembly code of a GCC compiled GTK+ app targeting a 64-bit OS, and that code was the same as mine. From a systems programmer point of view, I would never expect them to be significantly different either. My program has buttons and file choosers and pop ups ... all working as expected. My program, compiles, links, and runs perfectly fine in every respect except one: argc and argv are not valid parameters of main(). They are not valid integer values, they are not valid pointers, they are not even valid pointers to pointers. This is true for every single value I looked at on the stack up to 20 words deep. Let me rephrase this whole entire issue: Does anyone here have a working, tested, and simple program (not a command line only program) that runs in Windows with the GTK+ Win32 libraries, version 3.0 or above? If so, please give me a link of it so I can test it on my system. It could help tremendously in troubleshooting a problem am I seeing in an otherwise working program I have. Thanks in advance, Andrew == The following is not an assembly language question == PS -- I am very sorry I even the words "assembly language" to anyone in this group. The only reason it came up was because I needed to say I was debugging it in assembly language, so I had more than ample proof and experience to know that argv and argc were most definitely invalid parameters of the GTK program I am using. What happened to the parameters that they are not valid? == This preceding was not an assembly language question == On 4/15/2016 at 3:46 PM, Florian Pelz <pelzflor...@pelzflorian.de> wrote: >On 04/15/2016 09:59 PM, Andrew Robinson wrote: >> I may be the only person writing a >> program in GoAsm for for GTK+3 and cross-OS, but that has nothing to do with >> my problem. > >That you use GoAsm and GoLink instead of GCC can make a difference. >Different build toolchains may not be compatible. Where did you get your >GTK+ packages from? Does calling GTK+ functions even work? > >Either way, the stack usage is probably the same for all 32-bit Windows >programs. In the MSYS2 GCC, argc is at ebp+8, argv is at ebp+12, so >argv[1] is retrieved like this: > >mov eax, DWORD PTR [ebp+12] >mov eax, DWORD PTR [eax+4] > >Maybe you accessed the argv array pointer instead of the array elements? > >You can try it yourself on MSYS2 and compiling to assembler code like this > >gcc `pkg-config --cflags gtk+-3.0` -S test.c -masm=intel > >and linking like this: > >gcc -o test test.s `pkg-config --libs gtk+-3.0` > >I have no idea how to do this in GoAsm and I'm not going to try. > >_______________________________________________ >gtk-app-devel-list mailing list >gtk-app-devel-list@gnome.org >https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list