There are a couple of things that should be cleared up, lest Borneq become very confused!
James Harris has posted (on c.l.a.x.) a link to his example:
http://codewiki.wikispaces.com/winpopup.nasm(there are some other examples there, too)
This uses Nasm's "-f obj" output format (and Alink - "personal preference" is as good a reason as any to use it). In Nasm's "- obj" output format (only), "import" is a Nasm directive - in NASMX, "IMPORT" is a complicated macro - they are not the same thing! Also, "..start" is specific to "-f obj". Also, in "-f obj" output format, using "import", you want "call [ExitProcess]", etc. I think - but I don't remember for sure - that if you link (Alink) against the "win32.lib" that comes with Alink, you use "call ExitProcess", etc. - without the square brackets (republican parentheses), which is more usual. I'm not sure why this is, but it's a big difference, and it won't work "the other way"!
Nasm's "-f obj" is, by default, a 16-bit output format. There are 32-bit extensions - you'll have to tell Nasm "use32" in your segment/section declarations. If you use "-f win32", it's 32-bit by default, and you won't have to bother with that. I don't know if Alink will work with "-f win32" or not (not well, as I recall). You probably want to learn/use the more "modern" methods, as Keith suggests. If you "wanna do it the way you wanna do it" (asmfolk are like that, often), the "old" stuff still works (mostly... I guess Windows has gotten fussier since win98 - the last time I used it).
There are a flock of "old" examples in the "files" section of the !YAHOO! group, "win32-nasm-users". I packed 'em all up into:
http://sourceforge.net/projects/nasm/files/example%20code/yahoowin/yahoowin.zip/downloadIt is a bit of a "code bomb" - 16.7MB of unsorted example files, etc. Includes, I think, two versions of Nasm "translations" of the code from Iczelion's tutorials (this ain't the tutorials:
http://win32assembly.online.fr/tutorials.htmlthis is just the example code.) Iczelion's tutorials are highly recommended, and you should probably read them... even if he expects you to be using Masm.
Most of the examples use NaGoA - an IDE... unfortunately no longer supported, AFAIK. There may be a fairly recent executable in the "code bomb". You can use the examples without the IDE, in any case. "NaGoA" stands for "Nasm", "Gorc", "Alink"... so it's a huge archive of examples using Nasm and Alink, if you want to slog through it looking for the "gems".
Perhaps some of these examples should be "modernized" to be compatible with NASMX, or so...
None of this is intended to teach you assembly language! If you're new to assembly language, as well as to Windows programming, you may want to look at something completely different first...
http://www.drpaulcarter.com/pcasmThis tutorial "hides" the interface to the OS so it can be used with Windows, Linux, BSD, (MACOS?)... It won't teach you "Windows programming", which seems to be your goal, but if you're confused by the "assembly language" parts of the Windows examples, see if it helps.
I don't know why gdb doesn't believe your executables are executables. (I avoid gdb when I can, even in Linux) I don't think there's a way to add debug information in "-f win32". The "-g" switch will enable Borland's TD-compatible debug info in "-f obj" mode, but it doesn't really work right at its best (dos), and I doubt it'll do you any good at all in Windows! Ollydbg seems to do okay without it.
If you're asking "how do I know it should be 16 for MessageBox", consult Microsoft. Type some API name into Google and follow the link to Microsoft. Learn to navigate that help system. You'll need it!
Best,
Frank