Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying OpenCV with VS2017. But I want to use command prompt to build&run my projects. Because I can use "argv[1]" argument simply to pass images trough my apps. But I don't know how can I do it? Inside the Linux it was easy and I could do it by these commands:
C++
g++ name_of_app.cpp -o name_of_app

C++
./name_of_app "/home/path_to_image"


But Inside the Windows 10 I don't know how should I do that?

What I have tried:

I tried what I was trying inside Linux but didn't work! Actually I don't know how to do it on windows?
Posted
Updated 8-Mar-18 22:02pm
v2

1 solution

You can pass arguments to your apps from inside Visual Studio (and get the advantages of using the debugger at the same time):
1) Open your project in the Solution Explorer pane.
2) Double click the "Properties" branch.
3) In the resulting page, click the "Debug" tab on the left hand side.
4) Under "Start options" you can enter the command line arguments and working directory.

You can do it from the command line: c# - Build Visual Studio project through the command line - Stack Overflow[^] but it's a lot easier - and more flexible - to stay within the IDE.
 
Share this answer
 
Comments
Member 13376650 9-Mar-18 6:09am    
I can not find the properties branch inside Visual Studio
OriginalGriff 9-Mar-18 6:35am    
Check you have the Solution Explorer Pane open.
Then open the Project branch, under the Solution.
It's normally the top "twig".

Or you can right click the Project branch and select "Properties" from the context menu.

OIr you can look under "Project" on the menu bar, and select "--NameOfYourProject-- Properties"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900