English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am a foolish Windows user out of my element on a computer running Linux. I want to compile simple c++ console programs. Can you help?

2007-02-24 13:30:31 · 4 answers · asked by AlaskaGirl 4 in Computers & Internet Programming & Design

Those commands (g blah blah filename) don't work in the terminal. Do I need to install something?

2007-02-24 13:38:29 · update #1

The error I get is:
g++: command not found

2007-02-24 13:40:04 · update #2

4 answers

It sounds like you're missing the compiler and other bits (header files, object libraries). Fortunately you can get this for free. It would be if the question had details on the distribution you're using (Red Hat, Ubuntu, etc.) but I'll try some options that work for some of the popular ones.

The simplest option is to re-run the installation program for your Linux distribution. Most distributions offer an option to upgrade and you just need to select the appropriate option for C/C++ software development.

If that doesn't pan out, gcc should be available on the disc and installable by hand. If you're working with Fedora or Red Hat, you'll want to look for ".rpm" files. If you're using something like Ubuntu or Debian, then you might have it in a ".deb" file.

Some distributions like Ubuntu and Debian use programs that will download software automatically from archives on the Internet. Debian and Ubuntu and variants use "apt-get" and "synaptic". Fedora and Red Hat rely on a system called "yum".

I've included a few links below pointing to several distributions and Linux resources.

2007-02-24 13:57:27 · answer #1 · answered by Ralph S 3 · 1 0

To assemble for sixty 4-bit GNU (Linux is the kernel, no longer the OS), you want to gather it on GNU sixty 4 bit. you could't use a residing house windows compiler for GNU64. you want a GNU64 compiler for GNU64 on GNU64.

2016-12-04 22:00:07 · answer #2 · answered by ? 4 · 0 0

which compiler you have? If GNU compiler, then you'd just enter

gcc filename

or maybe

make filename

2007-02-24 13:33:23 · answer #3 · answered by BigRez 6 · 0 0

g++ myfile.cpp -o myfile

Where myfile.cpp is your source and myfile will be your executable.

Yeah, it means you dont have the GNU compiler installed on your machine. You will have to download it from somewhere. (Most machines already have this installed).

2007-02-24 13:35:31 · answer #4 · answered by rsmith985 3 · 1 0

fedest.com, questions and answers