Tag Info

Hot answers tagged

3

As you were told in your other question, gcc -o output_name filename.c produces output_name which has no extension. Why should it? You didn't tell it to. Next time, run the command giving the output file name an extension. Something like .bin or .exe or .myexecutableprogram or whatever. File name extensions are arbitrary in Linux. Since you have now ...


3

Unlike windows, Linux does not depend upon extension of a file to determine what type of file it is. Instead, it will check first few bytes of the file and determine what type of file it is. Hence the output file given by gcc requires no extension. You may add whatever extension you want(by changing -o output_name to say -o output_name.abcd), but it is not ...


2

The GCC 5.x suite is not available in 15.04. You can get it by adding a PPA, such as https://launchpad.net/~nicola-onorata/+archive/ubuntu/toolchain I am not sure if this will result in it being the default compiler though, so you may still need to call it as g++-5or similar, to use it. You may also have some serious issues with linking to certain C++ ...


2

first of all ,I don't know if this question should be asked here as it is a c language related question but since it is under ubuntu I will respond : the GCC compiler will look for headers depending on how you declare the header so there is two possibilities first : Declaring the header using angled brackets <> exemple : #include <math.h> in ...


2

It does not have one. You can do gcc -o myprog.exe filename.c and it will be called myprog.exe. Unlike Windows there is no default extension for executable files on Linux. If you want to mark a file as executable do chmod +x file. ls -l shows you if the x (executable) flag is set for your file: user@host# ls -l filename -rwxr-x--x 1 ubu users 42 Mai 10 ...


1

The full error message tells you part of the solution: you need to compile nauty with the -fPIC flag. Download nauty, unzip it, cd into the dir CFLAGS=-fPIC ./configure make Download pynauty, unzip it, cd into the dir ln -s ../nauty* nauty However, the pynauty's setup.py file appears to be misconfigured: it doesn't include the correct nauty files and so ...


1

with ls command we have option like hide --hide=PATTERN do not list implied entries matching shell PATTERN (overridden by -a or -A) So it will hide all matched and show what not matched. For example as in your case ls --hide='*.c' As you said your directory contains C Programs and its output files , the above command will ...


1

This is really nothing to do with gcc (or g++): what you need is file redirection ./y.out < file.in or (to redirect the program's output as well as its input) ./y.out < file.in > file.out



Only top voted, non community-wiki answers of a minimum length are eligible