I am trying to get started with Cmake and started with a simple tutorial found on the site. The c++ code is as simple as possible here:
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
The Cmake file is:
cmake_minimum_required (VERSION 2.6)
project (Tutorial)
add_executable(Tutorial main.cpp)
I generate the Visual Studio C++ solution and project files using the cmake-gui. I am able to build the project, but when I try to run the project I get a prompt stating that the ZERO_CHECK project is out of date and asks if I would like to rebuild it. When I select 'Yes' I get an error stating: 'Unable to start program ..Path../Debug/ALL_BUILD The system cannot find the file specified'. I did a lot of searching but was unable to find anyone who has had a similar error. Has anyone encountered something like this before?
Usually CMake sets the ALL_BUILD project as the startup project. You should right click on your Tutorial project in the solution explorer and set it as startup project. Then it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With