Solved

where to find the header file

Posted on 2003-10-31
4
166 Views
Last Modified: 2010-04-15
Hi,
Some header file are included as ,for example #include<openssl/ssl.h>. What is the path to locate this header file? And what's difference than using <ssl.h> or "pathname/ssl.h"?

what does the following flag variable defined in a Makefile mean?
CFLAGS= -g -I../../include

Thanks.
0
Comment
Question by:rongz
  • 2
4 Comments
 
LVL 17

Expert Comment

by:rstaveley
ID: 9658538
Try /usr/include/openssl/ssl.h if your system headers are in /usr/include.

The flag -g says to pass the next option onto a subprocess. Thus gcc gets the following flag.

The flag -I../../include says to treat ../../include as a location for system headers, which takes priority. Directories named by -I are searched before the standard system include directories.
0
 
LVL 6

Expert Comment

by:GaryFx
ID: 9658726
-g is the debug option.  I don't know where you got the idea that it's to pass the flag on to a subprocess.

Gary
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 9658839
> -g is the debug option.  I don't know where you got the idea that it's to pass the flag on to a subprocess.

Sorry, I managed to nuke some text and my train of thought, when a delivery came in. We've got a postal strike in the UK... and deliveries are something of an event. GaryFx is right: -g does indeed get you debug.
0
 
LVL 6

Accepted Solution

by:
Ajar earned 125 total points
ID: 9668991
suppose   ssl.h  file is in the dircetory    /usr/ssl/include/openssl  then all of the follwoint make same sense

1.
.........
#include<openssl/ssl.h>
.........
.........
gcc   -I/usr/ssl/include .....

2.
.........
#include<ssl.h>
.........
.........
gcc   -I/usr/ssl/include/openssl  .....
(BE CAREFUL With this   depending on which -I include directiove comes first  the file from that directory will be included
e.g   if you have   types.h in  /usr/include/sys/types.h   and also in /usr/include/types.h  dont use this type of shortcut option )


3
.........
#include "/usr/ssl/include/openssl /ssl.h"
.........
.........
gcc   .....


-g option is for debug
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now