Errors While Compiling my Game on Mac OS X Big Sur 11.10.1

Hello,

I’ve taken a look at all the forum posts on this issue and I’ve seen some similar posts, but nothing seems to be quite like what I am looking at. So here’s a screen shot of the errors that I’m receiving when I try to compile the code for triplex.cpp

So in another forum post I was told that I would have to configure VS code for Clang/LLVM for Mac OS.
Configure VS Code for Mac

So I type in all the correct code and this is the result for that

What am I doing incorrectly? I would appreciate your help.

What are you getting when you compile (you’ve only shown the problems tab and not the output of compiling)? Did you install Xcode?

Hi thanks for the reply,

I have installed Xcode for Mac.

here’s the image of the terminal output

the following is the text that I received from the output screen:

Done parsing remaining files.

cpptools/activeDocumentChange: file:///Users/meteorwave/Desktop/Text%20Game%20C%2B%2B/TripleX.CPP

cpptools/textEditorSelectionChange

idle loop: reparsing the active document

Checking for syntax errors: file:///Users/meteorwave/Desktop/Text%20Game%20C%2B%2B/TripleX.CPP

Queueing IntelliSense update for files in translation unit of: /Users/meteorwave/Desktop/Text Game C++/triplex.cpp

cpptools/finishUpdateSquiggles

Error squiggle count: 7

Error squiggles will be disabled in: file:///Users/meteorwave/Desktop/Text%20Game%20C%2B%2B/triplex.cpp

Update IntelliSense time (sec): 7.296

cpptools/activeDocumentChange: file:///Users/meteorwave/Desktop/Text%20Game%20C%2B%2B/TripleX.CPP

cpptools/textEditorSelectionChange

idle loop: reparsing the active document

Checking for syntax errors: file:///Users/meteorwave/Desktop/Text%20Game%20C%2B%2B/TripleX.CPP

Queueing IntelliSense update for files in translation unit of: /Users/meteorwave/Desktop/Text Game C++/triplex.cpp

cpptools/finishUpdateSquiggles

Error squiggle count: 7

Update IntelliSense time (sec): 0.258

Hopefully that’s what you need, let me know if you need anything else, I’m a beginner as far as programing goes.

Ah right, that should be std::endl not std.endl

Hmmm, okay I updated that line of code, and I still have the squiggle error. Will I be able to continue with the rest of the program? Or will this cause an issue later on down the road?

You should be able to continue, although the red underline would be annoying.

Could you try following the “A note to Windows users” article towards the beginning on the section?

Just change the developer command prompt stuff to just

which g++

To get the path for it.

Yes I went back and rewatched everything, and I decided to just start a new file completely. I copied and pasted everything over from triplex.cpp into a new folder and file name. This actually removed all the red squiggles and compiled the file completely, so I am now receiving output to the terminal. I just have one more question to see where it went wrong:

In the tutorial I understand they wanted us to write the int main() first.

Then they wanted us to call the #include

is it possible that writing the code in this way could have caused the issue? Perhaps I had compiled the code before adding the #include line and that caused the issue?

I appreciate your help so far.

Well you would need to compile again after making changes to your code. So if you didn’t recompile then that would be it.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms