0

I created a program in Eclipse and the only way it runs is from a console application like command prompt in Windows or a Unix terminal. I am using a windows OS so I want to know how to execute the program from command prompt, and from a unix terminal too?

1
  • BTW, you can remove the language tags because running a program doesn't depend on the source language(s) the program was developed with. Commented Oct 18, 2016 at 23:15

2 Answers 2

2

Check the documentation for the "start" command.

C:\>start /?
Starts a separate window to run a specified program or command.

START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
  [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
  [/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
  [command/program] [parameters]

"title"     Title to display in window title bar.
path        Starting directory.
B           Start application without creating a new window. The
            application has ^C handling ignored. Unless the application
            enables ^C processing, ^Break is the only way to interrupt
            the application.
Sign up to request clarification or add additional context in comments.

Comments

1

On Unix g++ <file-path> Example(from home directory) g++ ././C++/E1-13.c To run it ././C++/a.out Example(within directory) g++ E1-13.c To run it ./a.out

Note: you can use other file extensions such as .cc, .cpp, etc.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.