![]() |
|
#1
|
||||
|
||||
Using C command line compilationHello pals.
Ive recently moved to linux(ubuntu 6.0) and im trying to get used to the world of command line compilation for C. Since I was initially used to the IDE interface I never really had the experience of what happens internally. Since I am now interested in doing the same things using command line I think there are certain things which I need to know. Like I have installed the gcc compiler and now I wish to know how do i use it to compile files and then use the make utility (is it a utility or what?) to then create object files. Who linkes the object files and how exactly do we end up with the executables? I know i sound very naive and stupid now... ..bt pls forgive me for that as I will eventually become smart enough (hopefully) if guys like u would give me a lil pushstart Anyway..hope to hear something soon, __________________
Hope to hear from you guys! -------------------------------------------------- Best Regards, Aijaz Baig. |
||||
|
#2
|
||||
|
||||
Re: Using C command line compilationSee this google cached link, for the main link is now dead:
http://209.85.165.104/search?q=cache...lnk&cd=3&gl=us it has basic command line use, plus a make file example. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Using C command line compilationQuote:
cpp is the C pre-processor as is the assembler ln is the linker ar is the archiver gcc is the GNU compiler collection with default of C language objcopy/objdump describe the object file contents and change their content to differing file formats. <tool-name> <--h> produces help <tool-name> <--version> tells the version :davis: :davis: |
|
#4
|
||||
|
||||
Re: Using C command line compilationHello.
Thnx for the link guys. I would see how far can i go without being troubled again.. __________________
Hope to hear from you guys! -------------------------------------------------- Best Regards, Aijaz Baig. |
|
#5
|
|||
|
|||
Re: Using C command line compilationAlso if you're just learning a new complier check out gdb, it has capabilities to set break points, set through commands, print variables at certain points, etc. It can be a life saver for larger programs, and especially programs using memory addresses- where the error probably won't show up until much later in the program if at all!
|
Recent GIDBlog
Vista ?Widgets? on Windows XP by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Alt. Problem: PHP 4.4 GD compilation errors | Fezzen | Computer Software Forum - Linux | 2 | 12-Aug-2005 21:16 |
| Unfamiliar with this compilation error code <compilation of class into object file> | jkube1980 | C++ Forum | 1 | 24-Apr-2005 14:57 |
| What is "Ambigious symbol" ??*( a compilation error) | small_ticket | C++ Forum | 2 | 07-Jan-2005 21:10 |
| Compiler that Shows Stages of Compilation? | BobbyMurcerFan | C Programming Language | 2 | 26-Nov-2004 18:03 |
| Structure compilation problem | nkhambal | C Programming Language | 1 | 03-Aug-2004 08:16 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The