cc/gcc programming - where are the includes?

Chris Jones jonesc at hep.phy.cam.ac.uk
Wed Dec 19 14:36:47 UTC 2018


Hi,

On 19/12/2018 11:21 am, Christoph Kukulies wrote:
> Thanks. I have Xcode installed and I’m developing an App presently. I need to run a small server on my mac as well and I thought the best would be to run it in a terminal and compile it with a C-compiler of choice. Need not to be gcc. Just the default one. And thanks Ruben for the tip using the CPATH variable.

You should not need to set CPATH to find the standard system includes.

If you are still having problems, you need to provide more information 
for anyone to help. Exactly what commands are you running, and exactly 
what errors does that give, etc.

Chris

> 
>> Christoph
> 
>> Am 19.12.2018 um 11:48 schrieb Chris Jones <jonesc at hep.phy.cam.ac.uk>:
>>
>> Hi,
>>
>> First things first. Do you really need GCC ? The primary compilers in macOS are now based on clang, and I recommend you use these instead of GCC for a number of reasons. To have access to these you need to make sure you have Xcode etc. installed. see
>>
>> https://guide.macports.org/chunked/installing.html#installing.xcode
>>
>> For details related to using these compilers with MacPorts.
>>
>> Chris
>>
>> On 19/12/2018 8:32 am, Christoph Kukulies wrote:
>>> Does it require a special package to be installed when one wants to develop under cc or gcc in macOS?
>>> I was writing a little C program starting with
>>> #include <sys/types.h>
>>> and the compiler doesn’t find anything (what I would be normally under /usr/include
>>>>>> Christoph
> 


More information about the macports-users mailing list