1

I'm trying to run a cmake project (openmvg, for now) in Visual Studio 2017. I believe I've installed it correctly following the instructions.

Now, when I try to run it (Release / Win32), I get the following error message:

"Unable to start program "D:\openMVG\build\Release\ALL_BUILD"

I've checked the CMakePredefinedTargets, but I can't find a project target except ALL_BUILD, INSTALL, and `ZERO_CHECK.

Project View

Can anyone help with this problem? I'll appreciate any answer to it. Thanks.

Lev Zakharov
  • 2,409
  • 1
  • 10
  • 24
Tom Jangs
  • 11
  • 1
  • Possible duplicate of [How do I change the startup project of a Visual Studio solution via CMake?](https://stackoverflow.com/questions/7304625/how-do-i-change-the-startup-project-of-a-visual-studio-solution-via-cmake) – KymikoLoco Jan 15 '19 at 18:14

1 Answers1

0

By default a newly generated MSVC project will always set "ALL_BUILD" as its Startup Project. To run the project you need you have to set it manually by clicking (right button) on the project and choosing "Set as StartUp Project".

CMake predefined targets are there for, well, predefined CMake targets. Those exist for rebuilding, test running, installing etc. Usually they aren't candidates to be startup projects but some of your projects are.

ixSci
  • 13,100
  • 5
  • 45
  • 79