LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I see the surce code in Linux? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-see-the-surce-code-in-linux-267636/)

TheBlackMan 12-18-2004 02:34 AM

How can I see the surce code in Linux?
 
In linux, can the source code be seen?
If so, then begin
-how?
-can I make programs in Linux?
-what program do I need?
end;

Error1312 12-18-2004 02:39 AM

I don't have that much experience, but I believe you have to download the source files for the program. SRPM files are RPM's with the sources included. And tar.gz and the other formats you have to compile yourself also have the sources included. You just have to find them, open them in a text editor and than you can change whatever you want (on the condition you know what you're doing).

Yes, you can make programs in Linux. If you want C or C++ you can use KDevelop. If you want Java you can use NetBeans.
You might need to install the compilers and the right libraries first. They should be included on your linux cd's.

TheBlackMan 12-18-2004 03:58 AM

Oh, no I didn't mean the Linux program itself! I only ment programs in Linux. Sorry.

So, any commands that work in C also work in KDevelop? There is nothing else I should know about the program?
Does Mandrake 8.2 have the program?

What is the extension , ".gz", for ? Met it before and it kind of scares me.

Thanks!

Error1312 12-18-2004 04:57 AM

About the source explanation, I was talking about any program in linux or even linux itself. For example, if you want to see the source code of xine, I think you can download the SRPM's for it, or just the source files (which are the tar.gz files). If you extract them, you should get the source.

About KDevelop, I never had any problems with it for simple C programs, but then again, I never really used it that much. Simply try to write some simple programs like the hello world example. You won't be able to write programs with windows API's of course, but there are a lot of libraries for linux which you can do the same with as in Windows.

Mandrake 8.2 should have it. Simply enter 'kdevelop' in a konsole to check it out. If it is not installed, you can probably install it from your Mandrake 8.2 cd's. Otherwise, you can download it from www.kdevelop.org.

About the tar.gz format. I don't know exactly what it stands for (I think 'tar' means tarball and 'gz' means gzipped), but tar.gz is actually exactly the same as .zip in Windows. To extract it, you can open it with Ark (simply double click on it), or you can extract it in the konsole with the following command:

tar -xzvf filename.tar.gz

(if the extension is tar.bz2, use tar -xvjf filename.tar.bz2)
Usually it will create a new directory in the one you're working in. Simply cd to the new directory to see the files.

I hope I was a help to you.
Good luck with it.

TheBlackMan 12-18-2004 07:39 AM

I'm going to try what you said.

Thanks!


All times are GMT -5. The time now is 08:08 PM.