question

mrobot-5352 avatar image
0 Votes"
mrobot-5352 asked mrobot-5352 answered

VS IDE 2019 How to fix "Unable to start program...

Recently installed Visual Studio IDE 2019 version 16.10.0. I get no errors when BUILDING SOLUTION from the main.cpp file. But, when I run START DEBUGGING I get the error below. How do I fix this?:

png titles:
1. Debug Error Message
2. Properties for main.cpp, Cube.cpp, Cube.h
3. More properties
4. Folder structure where Cube.h, Cube.cpp, and main.cpp are located The solution and project files are up one folder in /dataStructure
5. VS C++ Template used for project
6. VS Tools installed on my machine

101119-image.png


101120-image.png


101191-image.png


101087-image.png


101109-image.png


101192-image.png


vs-debugging
image.png (141.9 KiB)
image.png (43.6 KiB)
image.png (54.4 KiB)
image.png (36.6 KiB)
image.png (79.9 KiB)
image.png (195.5 KiB)
image.png (60.6 KiB)
image.png (140.8 KiB)
image.png (33.3 KiB)
image.png (61.0 KiB)
image.png (37.3 KiB)
image.png (78.6 KiB)
image.png (188.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SimpleSamples avatar image
0 Votes"
SimpleSamples answered

Your solution is called dataStructures and consists of the two projects dataStructures and week1a-cube. The dataStructures project has no source code but is set as the startup project. I can tell that dataStructures is the startup project because it is highlighted in the Solution Explorer. Visual Studio is trying to execute dataStructures.exe because that would be the name of the executable if dataStructures had source code that results in an executable.

We do not know what you need to do. One of your images show creation of an empty project. That is good if you want a solution with multiple projects. At this point if you want to execute the executable created by the source code in the week1a-cube project then do as RLWA32 says; make week1a-cube the startup project. Right-click week1a-cube and select the item for doing that.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

mrobot-5352 avatar image
0 Votes"
mrobot-5352 answered RLWA32-6355 converted comment to answer

The third image is a mistake and should have been the image here below for the linker settings:

101177-image.png



image.png (60.6 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Ordinarily, the standard build macros will name the executable with the name of the project. In this case I would expect the executable to be named week1a-cube.exe not dataStructures.exe. Post the output of the build which should show exactly what is being created.

Also, have you made any changes to the debugging property page for the project?

0 Votes 0 ·

Below is the png of the build output. Also, I have NOT made any changes to ANY properties since of this new install of Visual Studio IDE.

101110-image.png


0 Votes 0 ·
image.png (25.4 KiB)
RLWA32-6355 avatar image
2 Votes"
RLWA32-6355 answered RLWA32-6355 commented

Make sure that the week1a-cube project is set as the start-up project for the solution.
For example -
101166-startup-projectpng.png



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Sorry, I did not see this answer when I posted mine; I only saw comments.

0 Votes 0 ·

No problem. I wasn't sure that the OP noticed the comment so I converted it to an answer & added the image at the same time.

0 Votes 0 ·
mrobot-5352 avatar image
0 Votes"
mrobot-5352 answered

I created the Solution in the same folder as the Project. Once I recreated everything with the solution as the top folder and the project under the solution, it ran like a charm.

Thanks @RLWA32-6355 and @SimpleSamples !

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.