问题描述:

I have a .exe file that I have built from the makefile of a set of source .cpp files.

It should take in a set of inputs and write the output to a .txt file. The manual I am following provides the following instruction for running it on linux:

./xyz -l4 -w6 -k4 -iSampleInputTJU.txt -oMyOutputFile.txt -p

But I need to run it on windows 10. So I typed in:

C:>\Desktop\xyz -l4 -w6 -k4 -iSampleInputTJU.txt -oMyOutputFile.txt -p

However it tells me that it cannot open the input file.

I am not sure what I am doing wrong. Please help. Any input will be appreciated.

网友答案:

To execute a program, regardless of platform. The format shall be:

<Program path> [program arg list]

The path can be relative or absolute.

In your Linux shell. You are running:

./xyz -l4 -w6 -k4 -iSampleInputTJU.txt -oMyOutputFile.txt -p

You are using ./. This means your program is under current directory.

In your windows console:

C:>\Desktop\xyz -l4 -w6 -k4 -iSampleInputTJU.txt -oMyOutputFile.txt -p

You are using absolute path here. You might not run the program under the path which your input file locates. You can type dir to check the current directory see if the input file is there.

相关阅读:
Top