NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: nobody on November 21, 2004, 05:56:09 PM
-
I need to know the isues for assemble and link with those C libraries.
For nasm:
What output switch I use fo each one?
Do I need import names of functions?
For the linking time:
Do I need a specific name for entry point?
I can use the make of the specific tool?
Some of this is like gcc that call the linker if you dont use the c flag, but the entry point is diferent name?
I need more to know?
-
I don't use any of those tools, but I think you'd want "-f win32" for all of them. Nasm's "import" directive is "-f obj"-only, I think. I guess you "don't need it" in "-f win32"(?).
I think you would need to specify the entry-point name to the linker, if you call the linker directly. I think "winmain" is "traditional"(?), but can be anything(?).
If you're using gcc to invoke the linker - no actual .c file involved - you'll be linking against the C "startup" code, which will want to call "main"... "_main", actually - all global or extern variables get "_" prepended to 'em.
You might get some help by looking at the examples in the doc, and/or in the "test" directory, if you've got the source.
Best,
Frank
-
Thanks, I will try them, and put the results.