Installing “C” on Ubuntu 18.04 LTS [duplicate]Can't run my hello world in C“cannot find -lmpi*” when compiling openmpi codeSony flash tools .tar installation on ubuntu 18.04associating file types with program in ubuntu 18.04
In-body neutral density (ND) filters?
SMD ceramic capacitor 0805 vs 1206
Phrase/Word-pair for a variant of master-slave relationship
Did Ohio pass a law granting students the right to give scientifically wrong answers consistent with their religious beliefs?
What definition takes up more memory, def or chardef (considering def contains a single character)?
What does shimmy in nose landing gear mean?
Why does rapeseed oil turn sticky but coconut oil doesn't?
Do monthly payments decrease on a mortgage later in the loan?
Arabia and the Middle Ages
Rsync: Are there any way to exclude multiples files and directory shortly?
Does 5e have a Manual of the Planes?
Was equal temperament caused by the invention of the piano, or was it inevitable?
Can a website incur liability for linking to a funding campaign for a lawsuit against it?
What is the "two-drive trick" that can read Amiga disks on a PC?
If you discard Immortal Phoenix, does it return to your hand?
Why are superuser permissions needed to acess /data partition?
Sort and Table a Sentence by Word Lengths
Why has no one requested the tape of the Trump/Ukraine call?
Getting into new PhD after failing comps
Is Scrum actually suitable for all kinds of projects?
Why are the rain clouds darker?
When Using Throne room on a Throne room do you need two more action cards already in hand?
Are we sinners because we sin or do we sin because we are sinners?
What kinds of sanctions would be applied if you wrongly invoked the Fifth Amendment?
Installing “C” on Ubuntu 18.04 LTS [duplicate]
Can't run my hello world in C“cannot find -lmpi*” when compiling openmpi codeSony flash tools .tar installation on ubuntu 18.04associating file types with program in ubuntu 18.04
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
This question already has an answer here:
Can't run my hello world in C
2 answers
I typed the "Hello, World" program in the Ubuntu text editor.
The file, 'hello' was saved to the documents
folder, which I verified, is there.
However, the "c" compiler, version 7.4.0-1, cannot find 'hello.'
Moreover, the program 'find' cannot find it either.
I would appreciate any help you can give me.
18.04 compiling
marked as duplicate by karel, Kulfy, Eliah Kagan, Kristopher Ives, cmak.fr Sep 13 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
show 4 more comments
This question already has an answer here:
Can't run my hello world in C
2 answers
I typed the "Hello, World" program in the Ubuntu text editor.
The file, 'hello' was saved to the documents
folder, which I verified, is there.
However, the "c" compiler, version 7.4.0-1, cannot find 'hello.'
Moreover, the program 'find' cannot find it either.
I would appreciate any help you can give me.
18.04 compiling
marked as duplicate by karel, Kulfy, Eliah Kagan, Kristopher Ives, cmak.fr Sep 13 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
Save it to your Home directory. Otherwise you'll need to provide path to this file.
– Pilot6
Aug 26 at 17:36
1
Would you post the commands you use, and thels
of you Documents/ directory?
– guillermo chamorro
Aug 26 at 17:45
@Pilot6 Why is that? I can compile a file in a subdir without a full path.
– guillermo chamorro
Aug 26 at 17:48
Anyway you need some path. You can't compile filehello
in your Documents by runninggcc hello
.
– Pilot6
Aug 26 at 17:50
@Pilot6 But I can do it?
– guillermo chamorro
Aug 26 at 18:18
|
show 4 more comments
This question already has an answer here:
Can't run my hello world in C
2 answers
I typed the "Hello, World" program in the Ubuntu text editor.
The file, 'hello' was saved to the documents
folder, which I verified, is there.
However, the "c" compiler, version 7.4.0-1, cannot find 'hello.'
Moreover, the program 'find' cannot find it either.
I would appreciate any help you can give me.
18.04 compiling
This question already has an answer here:
Can't run my hello world in C
2 answers
I typed the "Hello, World" program in the Ubuntu text editor.
The file, 'hello' was saved to the documents
folder, which I verified, is there.
However, the "c" compiler, version 7.4.0-1, cannot find 'hello.'
Moreover, the program 'find' cannot find it either.
I would appreciate any help you can give me.
This question already has an answer here:
Can't run my hello world in C
2 answers
18.04 compiling
18.04 compiling
edited Aug 26 at 20:16
Thomas Ward♦
52.7k24 gold badges132 silver badges190 bronze badges
52.7k24 gold badges132 silver badges190 bronze badges
asked Aug 26 at 17:34
O. Donn GraceO. Donn Grace
1
1
marked as duplicate by karel, Kulfy, Eliah Kagan, Kristopher Ives, cmak.fr Sep 13 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by karel, Kulfy, Eliah Kagan, Kristopher Ives, cmak.fr Sep 13 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by karel, Kulfy, Eliah Kagan, Kristopher Ives, cmak.fr Sep 13 at 6:55
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
Save it to your Home directory. Otherwise you'll need to provide path to this file.
– Pilot6
Aug 26 at 17:36
1
Would you post the commands you use, and thels
of you Documents/ directory?
– guillermo chamorro
Aug 26 at 17:45
@Pilot6 Why is that? I can compile a file in a subdir without a full path.
– guillermo chamorro
Aug 26 at 17:48
Anyway you need some path. You can't compile filehello
in your Documents by runninggcc hello
.
– Pilot6
Aug 26 at 17:50
@Pilot6 But I can do it?
– guillermo chamorro
Aug 26 at 18:18
|
show 4 more comments
1
Save it to your Home directory. Otherwise you'll need to provide path to this file.
– Pilot6
Aug 26 at 17:36
1
Would you post the commands you use, and thels
of you Documents/ directory?
– guillermo chamorro
Aug 26 at 17:45
@Pilot6 Why is that? I can compile a file in a subdir without a full path.
– guillermo chamorro
Aug 26 at 17:48
Anyway you need some path. You can't compile filehello
in your Documents by runninggcc hello
.
– Pilot6
Aug 26 at 17:50
@Pilot6 But I can do it?
– guillermo chamorro
Aug 26 at 18:18
1
1
Save it to your Home directory. Otherwise you'll need to provide path to this file.
– Pilot6
Aug 26 at 17:36
Save it to your Home directory. Otherwise you'll need to provide path to this file.
– Pilot6
Aug 26 at 17:36
1
1
Would you post the commands you use, and the
ls
of you Documents/ directory?– guillermo chamorro
Aug 26 at 17:45
Would you post the commands you use, and the
ls
of you Documents/ directory?– guillermo chamorro
Aug 26 at 17:45
@Pilot6 Why is that? I can compile a file in a subdir without a full path.
– guillermo chamorro
Aug 26 at 17:48
@Pilot6 Why is that? I can compile a file in a subdir without a full path.
– guillermo chamorro
Aug 26 at 17:48
Anyway you need some path. You can't compile file
hello
in your Documents by running gcc hello
.– Pilot6
Aug 26 at 17:50
Anyway you need some path. You can't compile file
hello
in your Documents by running gcc hello
.– Pilot6
Aug 26 at 17:50
@Pilot6 But I can do it?
– guillermo chamorro
Aug 26 at 18:18
@Pilot6 But I can do it?
– guillermo chamorro
Aug 26 at 18:18
|
show 4 more comments
1 Answer
1
active
oldest
votes
Welcome to Ask Ubuntu!
Make sure you are in the same directory in terminal as is your file hello.c
. Type cd /path/to/your_folder/
in terminal to go to it.
Then, gcc hello.c -o helloout
should compile it to the output file helloout
. To execute the compiled code, type ./helloout
.
Note: If I left the code file hello
without the .c
extension, gcc says
file not recognized: Unrecognized file format
Follows the example I tested (hello.c
).
#include <stdio.h>
int main()
printf("Hello, Worldn");
return 0;
add a comment
|
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Welcome to Ask Ubuntu!
Make sure you are in the same directory in terminal as is your file hello.c
. Type cd /path/to/your_folder/
in terminal to go to it.
Then, gcc hello.c -o helloout
should compile it to the output file helloout
. To execute the compiled code, type ./helloout
.
Note: If I left the code file hello
without the .c
extension, gcc says
file not recognized: Unrecognized file format
Follows the example I tested (hello.c
).
#include <stdio.h>
int main()
printf("Hello, Worldn");
return 0;
add a comment
|
Welcome to Ask Ubuntu!
Make sure you are in the same directory in terminal as is your file hello.c
. Type cd /path/to/your_folder/
in terminal to go to it.
Then, gcc hello.c -o helloout
should compile it to the output file helloout
. To execute the compiled code, type ./helloout
.
Note: If I left the code file hello
without the .c
extension, gcc says
file not recognized: Unrecognized file format
Follows the example I tested (hello.c
).
#include <stdio.h>
int main()
printf("Hello, Worldn");
return 0;
add a comment
|
Welcome to Ask Ubuntu!
Make sure you are in the same directory in terminal as is your file hello.c
. Type cd /path/to/your_folder/
in terminal to go to it.
Then, gcc hello.c -o helloout
should compile it to the output file helloout
. To execute the compiled code, type ./helloout
.
Note: If I left the code file hello
without the .c
extension, gcc says
file not recognized: Unrecognized file format
Follows the example I tested (hello.c
).
#include <stdio.h>
int main()
printf("Hello, Worldn");
return 0;
Welcome to Ask Ubuntu!
Make sure you are in the same directory in terminal as is your file hello.c
. Type cd /path/to/your_folder/
in terminal to go to it.
Then, gcc hello.c -o helloout
should compile it to the output file helloout
. To execute the compiled code, type ./helloout
.
Note: If I left the code file hello
without the .c
extension, gcc says
file not recognized: Unrecognized file format
Follows the example I tested (hello.c
).
#include <stdio.h>
int main()
printf("Hello, Worldn");
return 0;
answered Aug 26 at 17:54
Rodolfo FRRodolfo FR
463 bronze badges
463 bronze badges
add a comment
|
add a comment
|
1
Save it to your Home directory. Otherwise you'll need to provide path to this file.
– Pilot6
Aug 26 at 17:36
1
Would you post the commands you use, and the
ls
of you Documents/ directory?– guillermo chamorro
Aug 26 at 17:45
@Pilot6 Why is that? I can compile a file in a subdir without a full path.
– guillermo chamorro
Aug 26 at 17:48
Anyway you need some path. You can't compile file
hello
in your Documents by runninggcc hello
.– Pilot6
Aug 26 at 17:50
@Pilot6 But I can do it?
– guillermo chamorro
Aug 26 at 18:18