#Launch:program error

36 messages ยท Page 1 of 1 (latest)

thin stagBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

zealous atlas
#

A) compile and run manually (or with a makefile) through terminal
B) #1013107104678162544

little sable
zealous atlas
little sable
#

do you know where I would write this?

zealous atlas
#

I assume for C++ it's something like

g++ source.cpp -o executable
zealous atlas
little sable
#

would it be inside the terminal?

#

o thx

zealous atlas
#

Make sure you cd into the correct directory first

little sable
#

huh now it's saying fatal error

little sable
zealous atlas
#

The terminal.
Make sure the path is where your source file is.

little sable
#

yeah it just says "no file or directory"

zealous atlas
#

Send screenshot please

#

Also can you tell me in what directory your source file is?

little sable
little sable
zealous atlas
zealous atlas
#

And executable with whatever name you want your executable to have.
On Windows probably something like my_program.exe

little sable
#

crud

zealous atlas
little sable
#

๐Ÿ˜…

zealous atlas
#

And a file name can't start with .

#

(afaik, at least for Linux)

little sable
#

YES

#

finally ๐Ÿ˜ญ

zealous atlas
#

So given you have a source file main.cpp in a directory C:/a/b then you need to do:

cd C:/a/b
g++ main.cpp -o main.exe
./main.exe
#

Ah, you figured it out already

little sable
zealous atlas
thin stagBOT
#

@little sable Has your question been resolved? If so, run !solved :)

little sable
#

!solved

thin stagBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity