Comments (9)
Realized this is more of an issue with the difference between GCC/clang on a mac
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
from 21st-century-examples.
@b-k Have you had a chance to read this?
@schneems How did you fix this?
from 21st-century-examples.
@bucaran you don't need -Wall
in this example.
from 21st-century-examples.
Great. Thanks @schneems
from 21st-century-examples.
Hi, sorry I missed your message.
Some Macs ship with a version of GCC that has been recompiled to default to certain standards and use different flags from the usual gcc. On the Mac I tested on that had this gcc alias, I set up a one-line script name gcc consisting of
clang $*
and put that in my PATH. There are other ways to get around Apple's specialized gcc. For the examples, you can remove -Wall, as @schneems noted, but that's probably a bad habit for day-to-day code writing.
Also, I'm told that a lot of macs don't yet have the at_quick_exit function as specified in the C11 standard, so that will have to be commented out to compile on those macs.
I hope that helps.
from 21st-century-examples.
I'm not able to get this working, same error as @schneems. I've tried the clang $*
trick in a file named gcc
in my root directory, and chmod +x
it and put ~/
on my PATH, but I'm still getting error 64.
Is there something else that I'm missing? The code runs fine on Ubuntu, but that's not as convenient as using OSX on my Mac.
from 21st-century-examples.
So I got it working...at least for me, the minimal makefile
is just the following, no need for alternate files/PATH solutions:
OBJECTS=
CFLAGS= -g -Wall -O3
LDLIBS=
CC=clang
$(P): $(OBJECTS)
from 21st-century-examples.
Great, thanks for posting this @randyzwitch
from 21st-century-examples.
Can confirm. That worked, thanks!
from 21st-century-examples.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 21st-century-examples.