Please help, I am leaning C on my own so you are my only Hope :o
I am using that "The C programming Language" E-book but it does not teach how to compile in linux - I was too long ago :rolleyes: when those Bell Lab guys wrote it :cry:

I am using the GNU gcc compiler, I find it hard to work with it.

Salem commented: "The C programming Language" E-book - your book is illegal, there is no free download of this book. +0

Recommended Answers

All 8 Replies

type gcc programName.c -o programName -Wall and then to execute ./programName -Wall is optional

Hey andor thank you - I've been recompiling my code in gcc so I may use the programs in Linux now, thanx again :)

If I may ask, do I use the same process to compile cpp code? Please don't say "RTFM!" It is a bit complicated - I'm new to this Linux Programming thing :)

Hey andor thank you - I've been recompiling my code in gcc so I may use the programs in Linux now, thanx again :)

If I may ask, do I use the same process to compile cpp code? Please don't say "RTFM!" It is a bit complicated - I'm new to this Linux Programming thing :)

No. Istead of gcc type g++. Of course the file name is cpp instead of c.

If you're going to get serious about programming, you may want to get an Integrated Development Enviroment, or IDE. It's a program that allows you to visually manage your source code files, which is especially useful when working with large projects that may have more than one code module. It's also easier than invoking the gcc (or g++) command each time.

Maybe this list is to complex
If so, I recommend KDevelop or Anjuta.

No. Istead of gcc type g++. Of course the file name is cpp instead of c.

A rather odd thing to do for C code.

commented: read the question he was answering! +0

A rather odd thing to do for C code.

Yup but not for c++ code

If I may ask, do I use the same process to compile cpp code?

No. Istead of gcc type g++. Of course the file name is cpp instead of c.

Yup but not for c++ code

Ya know, I swear I read that about 5 times, but I kept missing it. D'oh! :sad:

commented: Never doubted (andor) +3

I think it's Automake and Autoconf that generate makefiles/configuration scripts that you can use to bundle with the program if you're planning to distribute it to ease the compilation process on other computers. Again, an IDE does all this for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.