'Running C++ exe file in PowerShell

I'm usually not programming in C++, but this time I had to and I've got a problem executing my code in PowerShell (which I have never done before). The program is written using CodeBlocks, it works fine. I specify arguments in Project_> Set program arguments and in does what it should, if no arguments are specified it returns an info about that, as it should.

The thing is, I built my program in CodeBlocks, then wanted to run the generated \bin\Program.exe' file in PowerShell. I enter:

C:\path\to\Program.exe

and nothing happens. I tried that with arguments, still nothing at all. I fixed all missing .dll files, but I'm lost. Do I produce the .exe file in a wrong way? Is there any way to fix this issue?



Solution 1:[1]

First, make sure you're in the directory of the executable.

cd "C:\path\to\"

Then, execute the program as so:

.\"Program.exe"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Guy Keogh