I want to create a simple application in Assembly (with NASM) that will get the command line arguments. For now I use extern _GetCommandLineA
and call _GetCommandLineA
to call the function. I compile the code and get the object file from NASM.
Now I wanna use GCC to link and create the EXE. I don't want to use the standard libraries, so I use this command to build the executable:
gcc test.obj -s -nostartfiles -nostdlib -nodefaultlibs -o test.exe
It gets me an Undefined reference to GetCommandLineA
error and, as a beginner in ASM, I don't know why? Some help would really be appreciated. Thanks in advance!