(Not Working) Your First Program


Hi all,

I’m on Visual Studio on MacBook Pro 2019 macOS Big Sur and am unable to compile in the project “Your First Program” As a result I am unable to move on with the next tasks. Does anyone know what I can do to fix it?

I have attached a screen shot of what we’re looking at here

Connor

Hi there and welcome to the community.

Your build seemed to work in VS code. There’s no error and it reached the linker. It should be a matter of executing the program now. run an ls and look at the files there. Also, I believe cl has an option to specify the output name.

As for Visual Studio, in Windows at least, you should just have to build from the menu (also CTRL+SHIFT+B so maybe COMMAND?) and F5 runs an application so you can try these.

You ought to be using g++ on macOS as showcased in the macOS specific lecture.

g++ triplex.cpp -o triplex

Which will compile the file triplex.cpp file and output an executable triplex with no file extension. Then you would type

./triplex

To execute that.