bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] compile error location of malloc.h


From: Christian Robert
Subject: Re: [Bug-apl] compile error location of malloc.h
Date: Mon, 29 Aug 2016 01:58:40 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 2016-08-29 01:21, Elias Mårtenson wrote:
They are, but if they are not found in the local directory, they are also 
searched for in the system directories.

and if so, why did the compiler didn't find "malloc.h" ?  was not at all in 
system defaults ? (don't know at all about OS X)

I agree with both your statements, normal compiler will search system if not found 
locally for "malloc.h",
but the *right thing to do* is specifying "<>" when expecting system and specifying 
"" when
expecting local "*.h" file in the same directory as the source.

we agree on this,

Xtian.


That said, in this case using the angle brackets is the correct thing to use.

On 29 August 2016 at 13:08, Christian Robert <address@hidden 
<mailto:address@hidden>> wrote:

    that should read:

    #include <malloc.h>

    or better

    #include <stdlib.h>

    things in double quotes are searched in local directory by default and not 
in system.

    Xtian.


    On 2016-08-28 23:42, Xiao-Yong Jin wrote:

            LApack.cc:21:20: fatal error: malloc.h: No such file or directory
             #include "malloc.h"
                            ^
            compilation terminated.

        Under OS X, it’s in /usr/include/malloc/malloc.h

        Is it actually needed?  The code compiles fine without the #include.

        Best,
        Xiao-Yong








reply via email to

[Prev in Thread] Current Thread [Next in Thread]