How to include header files using hte link command
- From: "srikanthks.hsr@xxxxxxxxx" <srikanthks.hsr@xxxxxxxxx>
- Date: Thu, 05 Jul 2007 15:20:25 -0000
Hi, I have a strange problem where I want to include a header file
present in a folder. I will explain it with an example
I have a directory structure
parent --> child --> include --> file test.h
parent folder has a file test.cpp and test.h
in the file test.h i want to link the file test.h present in the child
include directory
I tried to do it by typing link child\include\test.h in the file
test.h present in teh parent directory.
I get an error when i compile this file. Can any one let me know how
to use the link command in the header file? I use Suse linux 10.2 with
glibc version 2.5
sample program
test.cpp
#include "test.h"
void main()
{
#ifdef DISPLAY_DECL
display();
#endif
}
file test.h present in parent directory
link child/include/test.h
file test.h present in child/include/test.h directory
#ifndef DISPLAY_DECL
#define DISPLAY_DECL
#endif
I compile using g++ test.cpp
.
- Follow-Ups:
- Re: How to include header files using hte link command
- From: Jens Thoms Toerring
- Re: How to include header files using hte link command
- Prev by Date: Re: how to change the limit of file number in directory
- Next by Date: Re: Can't undate running process binary in Solaris?
- Previous by thread: Re: Terminal Server connection pauses; traffic building up on queue
- Next by thread: Re: How to include header files using hte link command
- Index(es):
Relevant Pages
|