for your understanding at a higher, non-programmer level -
The above statement does this
1. preprocesses - meaning it invokes a program to honor the #include directives, #define directives in myfile.c. The name of the program that does this is usually cpp.
2. compile - transform the preprocessed code into assembly language - see pludi's
nice description above
3. link edit - this is done by the ld program. The -lm brings in a library (precompiled shared library of code) called libm. The ld program looks for all of the external symbols in your code (like printf() ) and find the external symbol in a library. Each external function you call has to be tracked down then evaluated by ld. It also finds external variables for you. It packs all of this into a specially formatted file - in "a.out" format or ELF format - or whatever file format your machine uses. There are others.
The final product is compiled or binary code, which can be run directly by the operating system.
The stement aboves means "compile myfile.c, write it out to a binary file called myfile and link against libm". BTW, ld by default, also links against the standard C library, libc, so you do not have to "ask" for it.
Hi,
While trying to configure Apache Web Server on P630 Server i am getting the below message
"Creating Makefile in src
+ configured for AIX 5.2 platform
Error: could not find any of these C compilers
anywhere in your PATH: gcc cc acc c89
Configure terminated"
when i did a "lslpp -l... (2 Replies)
i have windows 7 64bit, and i want to program C in it, i have the eclipse for C, but it wont work because i have no C compilers , where do i get a C compiler, so eclipse will work?
I usually transfer to a unix server and use a command
gcc -Wall -g -o ___ ___
where can i get the gcc C... (5 Replies)
Hello
I have a questions and m stuck on it.
Theoritcally the phases of compiler.
1. Lexical analyis -- genrates tokes
NOW MY QUESTION IS: where i can see these token if i make a simple C program.
Please guys tell me step to see it. and other phases too.
your help will be appreciated... (1 Reply)
Hello,
Long-time Unix hacker here - I've worked on four variants of the kernel prior to the introduction of Linux. In my spare time, I've written Linux (Ubuntu) device drivers, kernel modules, cross-compiled, and built the kernel.
I'd like to do Linux internals/device drivers as a day job,... (1 Reply)
I have g++-4.6 and g++-4.8.2 installed on my system and want to build a suite of programs using each one.
I am thinking putting the option on what to build by having a different target, one for g++-4.6 and another target for g++-4.8.2.
What do you think? (1 Reply)
I have a SPARC server with Solaris SPARC 10 OS installed
I am trying to compile source code from VLC media player and PHP 7 tarballs
However the stumbling block I encounter is that when I type in ./configure into my PUTTY terminal the GCC compiler tells me halfway through configuration that... (3 Replies)