Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all! I have an absolutely "newbie" question, regarding invoking of programming tools in Linux.I've installed OpenSuse 11.1 and have installed gcc packages and I've downloaded and installed jdk1.6.0_10 too. ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    5

    Arrow Invoking programming tools on OpenSuse 11.1

    Hi all!
    I have an absolutely "newbie" question, regarding invoking of programming tools in Linux.I've installed OpenSuse 11.1 and have installed gcc packages and I've downloaded and installed jdk1.6.0_10 too.
    I don't know how to invoke gcc compiler from a terminal or bash command line,in order to compile and run some file(C,C++,Java etc.) and what command line options needed.I know all this procedure on a Windows platform.I want to ask if there is some way like Windows to configure system path,classpath or if the whole procedure is totally different on Linux.I also want to ask if ther is some way for jdk I've downloaded to make it work instead of jdk1.5 already being on system and what is the procedure generally for whatever programming tool I may download in the future.Of course I can understand that these questions may want a whole documentation to be answered,but I want just to know the basic lines.
    If anybody could give me a :Pengy:clue about that,some tutorial,docs or book that explain clearly these procedures I would appreciate it very much.Thanks in advance!

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Hello,

    I can help on the GCC issue.
    If you want to compile a single C source file, linked automatically to an executable and saved under the "myprog", type

    cc main.c -o myprog

    Replace cc with g++ for C++ files.

    In general, if you need to get first aid on any program, call the manpages.
    For example,
    man cc

    Here you find the official documentation for the GNU Compiler Collection
    GCC online documentation - GNU Project - Free Software Foundation (FSF)

    And here a free manual
    An Introduction to GCC - Table of Contents
    Debian GNU/Linux -- You know you want it.

  3. #3
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    If you use an IDE, you can configure all of those things ($PATH, $CLASSPATH, gcc and javac commands/options/versions) for each project and have them loaded automatically when you're working on that particular project. It's one of the conveniences an IDE provides over working strictly from the command line.

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Posts
    5
    Thanks for your reply GNU-Fan.Reading your post I understand that using gcc in Linux is very similar to that of Windows,so no problem.I already got the GCC docs,and I'll give it a thorough look,as I haven't done it in the past.Thanks again.
    Thanks for your reply Thrillhouse,too.I have used some IDEs on Windows and as I read in your post,the whole thing is similar on Linux,so no problem at all.Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...