Xcode 10.1 error when compiling C++ files
See original GitHub issueI have a file abc.pyx that starts:
# distutils: language=c++
(because I am using vector).
This file compiled fine until I upgraded to Xcode 10.1 (10B61). I now get the following error:
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard
library instead [-Wstdlibcxx-not-found]
abc.cpp:636:10: fatal error: 'ios' file not found
#include "ios"
^~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
All of my pyx files that are compiled using C instead of C++ are compiling correctly.
I am using Cython 0.29 in an Anaconda environment with Python 3.6.2 on macOS Mojave 10.14.1.
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:14:59)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
My setup.py looks like:
setup(ext_modules=cythonize[(abc.pyx)])
I am building using the following command:
python setup.py build_ext --inplace
python setup.py install
Any suggestions would be greatly appreciated. Is there any way I can pass a compiler option to just those files?
This StackOverflow response is close, but I don’t want to compile all of my pyx files into C++. I tried that, but got other errors. It would be simplest if I could just resolve the issue of this single file.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
XCode 10 - "new" file not found
I tried to compile my project which use both Objective-C and C++ files. ... Compiler gives this error: 'new' file not found. Why...
Read more >Why do I have errors when build c code with Xcode?
I have code, that compile with gcc gcc --version Apple clang version 14.0.0 (clang-1400.0.29.102) Target: arm64-apple-darwin21.6.0 Thread ...
Read more >Unable to compile my .c files using the mex command ...
when typing the 'mex -setup' command I got: MEX configured to use 'Xcode with Clang' for C language compilation. Warning: The MATLAB C...
Read more >Top 10 C++ header file mistakes and how to fix them
Recommendation: Check your header filies by compiling them in isolation via a testMain.cpp that includes nothing but the header file under test.
Read more >Not able to build the swift compiler
I would try to remove this Xcode 2 completely, xcode-select -s the original one, xcode-select --install to make sure tools are installed and ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue was resolved by upgrading to the Xcode Command Line Tools 10.1, released on November 2, 2018.
Originally posted by @TruongKhang in https://github.com/coccoc/coccoc-tokenizer/issues/5#issuecomment-504321367_
The
setup.py
file should be changed to something like: