moondeck wrote:For me using GCC and ld separately made me understand what is actually going on, and get a basic idea of what linking is.
The thing is, you
- the programmer - is not
using it separately if the programmer is using a makefile or GCC to link (or a combination
of both). Technically the compile/link is separate and technically the programmer initiated the compile/link, however the programmer
has no control of the separate processes. The only way the programmer can compile and link separately is either to enter the commands
directly (in which case the programmer can pause between commands) and link
"separately" or use a command script with a
pause
command to separate the commands and link
"separately". And yes, a makefile
is the much better, preferred method.
Notwithstanding and are you listening
gerryg400?
mikegonta wrote:Personally, I prefer to link separately during development. That way I can concentrate on getting it to compile without concern for
getting it to link just yet. I use a Windows command script, I know a make file is better, however the script allows me more control ...
Let me add that I do this so that I don't have to link the file in the early stages. This way I don't get a pile of linker errors for uninitialized
"this, that and the other thing" which I haven't bothered doing because I am more interested in getting it to compile and/or reviewing the
asm listing for a better understanding.