[Info-vax] C compiler snag
Craig A. Berry
craigberry at nospam.mac.com
Wed May 19 07:57:06 EDT 2021
On 5/19/21 4:51 AM, Richard Levitte wrote:
> Hey folks,
>
> it's been long since I've been present here... been all busy with
> OpenSSL, not much time for something else.
>
> Now, speaking of OpenSSL, I'm hitting an "interesting" snag that I
> can't seem to find a good solution for. It's easy to demonstrate, with
> this set of files:
>
> humpf.c
> [.incl]h.h
> something.h
>
> ----- humpf.c
> #include "./incl/h.h"
>
> int main()
> {
> }
> -----
>
> ----- [.incl]h.h
> #include "../something.h"
> -----
>
> ----- something.h
> int foo(void);
> -----
>
> The content of those files isn't terribly interesting, but the inclusion sequence is, i.e. humpf.c includes "./incl/h.h" includes "../something.h". Structures like this may seem strange, but they do exist. So now for the snag:
>
> -----
> $ cc humpf.c
>
> #include "../something.h"
> .^
> %CC-F-NOINCLFILEF, Cannot find file "../something.h" specified in #include directive.
> at line number 1 in file USER:[LEVITTE.TEST.CC-INCL-2.INCL]h.h;1
> -----
>
> So my question is, is there any trick that I can do with the
> compiler to make this go through without error? i would rather not have to
> restructure the inclusion if I can.
Have you tried specifying the current working directory in Unix format
on the command line:
cc/include="./" humpf.c
?
I think I remember something like that being necessary for some
situation, but I'm not sure if it was this situation exactly.
Other than that, SET WATCH FILE is your friend for figuring out where
exactly the compiler is looking for the file it can't find.
> Version data:
>
> (alpha) $ cc/version
> VSI C V7.4-002 on OpenVMS Alpha V8.4-2L2
>
> (itanium) $ cc/version
> VSI C V7.4-001 on OpenVMS IA64 V8.4-2L1
>
More information about the Info-vax
mailing list