0

I'm running through some source code that I was given, but I'm accessing it through SSH. It includes a header file or two which i'm not familiar with and I don't believe is part of the C libraries that are provided.

Is there a way that I can do this? Where should I look in the system files to see what this header file contains?

The top of the file reads:

23  #include <stdio.h>
24  #include <stdlib.h>
25  #include "support.h"

But there is no support.h file in the .c file's directory...where could it be?

Riptyde4
  • 5,134
  • 8
  • 30
  • 57
  • Depends on the platform you're connected to by SSH. If it's Linux, you can check /usr/include, usr/local/include as a good start. – giogadi Oct 23 '13 at 19:28
  • You might just have to search for it in the OS with a simple file search. – jramirez Oct 23 '13 at 19:28

2 Answers2

0

You can try find <project-root-dir> -name support.h. It's likely to be in a directory like include, but of course could be anything. Also if it builds, you can look at the compile command and see what -I directories are supplied. As a last resort you can try locate support.h or find / -name support.h.

Michael Krelin - hacker
  • 138,757
  • 24
  • 193
  • 173
0

Apart form searching the filesystem with either find or locate, if you have access to the makefile, you should find the information in the compilation line after in a -I argument.

damienfrancois
  • 52,978
  • 9
  • 96
  • 110