Mac C++ programming on Xcode 11.1 is broken?

MAXAAPL

macrumors member
Original poster
Sep 17, 2018
35
15
Hey all,

I’ve been encountering this issue since I decided to upgrade to Catalina. I’ve tried asking on Apple developer forums and searching on stack overflow for a solution.


I use xcode as a student for my programming projects in C++. Ever since I downloaded 11.1 on Catalina I’ve been getting an issue that Xcode can’t find the c++ header files. I’ve tried using
Code:
xcode - -select
. Tried exporting the header file path in my zsh profile(shouldn’t need to do either since xcode comes packaged with these files). Tried reinstalling both Xcode and the OS. Downgrading back to Mojave etc but yet the issue persists.

Asking on the Apple developer forums and a lot of people are experiencing the issue as well. The weird thing is that the programs compile fine but for whatever reason Xcode says it can’t find the header file.

Tried to make a new project to see if something was up in my projects build settings but nope. Creating a new command line tool project and Xcode says it can’t find the iostream file. Restarting my Mac sometimes fixes it but the behavior is just weird. For example if I create a new command line tool project the error message would go away but then if I create a new header file without a cpp file and try to include a library, it will show that the file can’t be found. If I create a header file and a cpp file, it goes away until I close Xcode and then the issue comes back. Or it will be found for one file but the other file it won’t be able to.

“Senior software developers” who lurk on the Apple forum tell me it’s not a bug and that it’s user error. I don’t understand how it’s not a bug if the issue happens on a brand new MacBook that I recently bought as well.

I would try other editors but vs code randomly spikes my cpu and has my fans blowing. CLion is a little sluggish. I guess I’ll try qt creator but still wanted to see if anyone else could help with fixing this issue.


Thank you.
 

casperes1996

macrumors 601
Jan 26, 2014
4,373
2,210
Horsens, Denmark
If they say that but don't offer a solution they are either pretenders trolling or jerky *******s.

I think your best bet for now is to send a bug report to Apple with this, and use a different editor in the intermediate. I don't code C++ yet myself, but if I'm not mistaken, CLion is one of the JetBrains products. If so I'd give it another go. Their other editors like Intelij and AppCode are excellent. Android Studio is also based on JetBrains' editors. A fork in fact. In what ways is it sluggish for you? JetBrains IDEs are usually pretty snappy on my 2014 MacBook Pro.

In any case, if you send Apple a bug report, I've often experienced them replying. So there's a good chance they'll either tell you a fix/workaround or just fix it for next update.
If you have an Apple Developer account you can also get in touch with higher up tech stuff a few times per year. Don't know if you'd want to spend that go on this but it's an option (extra contact initiations can be purchased as extra I believe)

There's also an IDE named Dev C++. Open source and regarded as one of the best C++ IDEs.

Sorry I don't have a fix
 
  • Like
Reactions: MAXAAPL

MAXAAPL

macrumors member
Original poster
Sep 17, 2018
35
15
Yeah I definitely got that vibe from them. Said they’ve been around a long time and this issue has happened before and that it’s me doing something with the system files. Was really annoying but thanks for understanding ha.


And yeah I’m giving CLion another go. Its not as bad as when I first tried it.


Definitely going to submit a bug report Thanks for responding!
 

Senor Cuete

macrumors 6502
Nov 9, 2011
283
12
There are all kinds of problems with XCode 11 and Catalina. It looks like Catalina is a lot of this. When I upgraded to Catalina 10.15.1 some but not all of my problems were solved.
 

MAXAAPL

macrumors member
Original poster
Sep 17, 2018
35
15
So knock on wood but the latest stable release of Xcode 11.2 seems like they have fixed this.