Getting a weird linker error in my cpp code #3659
Replies: 6 comments 28 replies
-
I don't think it's an issue with your code, I think there's just an actual linker bug. You haven't mentioned your OS and XCode version but I'm guessing MacOS Monterey and XCode 13 or 14? |
Beta Was this translation helpful? Give feedback.
-
Please notify me if you find any solution for this |
Beta Was this translation helpful? Give feedback.
-
Having the same issue after the Xcode update. macOS 12.5.1, Xcode Version 14.0 (14A309), M1 processor. |
Beta Was this translation helpful? Give feedback.
-
Yes, this is a Xcode 14 bug. Apple are working on this. It should be fixed in a future Xcode beta (not 14.1 beta 1). The only known workaround is downgrading to Xcode 13.4. |
Beta Was this translation helpful? Give feedback.
-
I used -O2 to compile my cpp file, and it works!
Hope it can help you. |
Beta Was this translation helpful? Give feedback.
-
Under the MacPorts package system this did the trick for my purposes today (to be able to do a native build under PlatformIO): sudo port install gcc12
cd /opt/local/bin
sudo rm -f gcc g++ cc
sudo ln -s gcc-mp-12 gcc ; sudo ln -s g++-mp-12 g++ ; sudo ln -s g++ cc
cd -
rehash The same general idea should also work for Homebrew. We'll see if it continues to work under macOS 13 Ventura. |
Beta Was this translation helpful? Give feedback.
-
hi everyone , I am getting this error in my code I have never seen this before please help me resolve it -
code -
Beta Was this translation helpful? Give feedback.
All reactions