Cannot Find Include File

Cannot Find Include File

Post by Jay Sin » Wed, 14 Nov 2001 08:47:01



I was trying to test out sample programs that come with the C++ object
interface. However I keep getting error messages "cannot fine the *.h
files".

I even hard coded the "include" path include
"/usr/opt/informix/incl/c++/it.h"

but then I started getting errors for other files that it.h refer to
but are not included in the same folder as the c++ includes.

In the documentation, I could only find references to LD_LIBRARY_PATH
env variable which I did set.

However I have a feeling that there is some other environment variable
that needs to be set so that the compiler can find the includes.

Linux Red Hat 6.2, with client sdk 2.70 UC1 installed.

Command:  g++ -o csql csql.C

Thanks

Jay Singh

 
 
 

Cannot Find Include File

Post by Sergey E. Volko » Wed, 14 Nov 2001 17:40:12


Command lile must be like:

c++ -I$INFORMIXDIR/incl/c++ -I$INFORMIXDIR/incl/dmi -I$INFORMIXDIR/incl/esql

in files:

#include <it.h>

...

Good luck.

----- Original Message -----


Sent: Tuesday, November 13, 2001 2:47 AM
Subject: Cannot Find Include File

> I was trying to test out sample programs that come with the C++ object
> interface. However I keep getting error messages "cannot fine the *.h
> files".

> I even hard coded the "include" path include
> "/usr/opt/informix/incl/c++/it.h"

> but then I started getting errors for other files that it.h refer to
> but are not included in the same folder as the c++ includes.

> In the documentation, I could only find references to LD_LIBRARY_PATH
> env variable which I did set.

> However I have a feeling that there is some other environment variable
> that needs to be set so that the compiler can find the includes.

> Linux Red Hat 6.2, with client sdk 2.70 UC1 installed.

> Command:  g++ -o csql csql.C

> Thanks

> Jay Singh


 
 
 

Cannot Find Include File

Post by Jay Sin » Thu, 15 Nov 2001 01:32:53


Thanks, That helped a bit, but now I am running into more problems. I
am getting the following error messages. I do not understand what is
going on.

Any help would be greatly appreciated.

Thanks

Jay Singh

LORA:/home/informix/cpp/proj01 g++ -o csql -I$INFORMIXDIR/incl/c++
-I$INFORMIXDI
R/incl/dmi -I$INFORMIXDIR/incl/esql csql.C
In file included from csql.C:3:
/usr/opt/informix/incl/c++/it.h:85: parse error before `false'
/usr/opt/informix/incl/c++/it.h:86: parse error before `true'
LORA:/home/informix/cpp/proj01


> I was trying to test out sample programs that come with the C++ object
> interface. However I keep getting error messages "cannot fine the *.h
> files".

> I even hard coded the "include" path include
> "/usr/opt/informix/incl/c++/it.h"

> but then I started getting errors for other files that it.h refer to
> but are not included in the same folder as the c++ includes.

> In the documentation, I could only find references to LD_LIBRARY_PATH
> env variable which I did set.

> However I have a feeling that there is some other environment variable
> that needs to be set so that the compiler can find the includes.

> Linux Red Hat 6.2, with client sdk 2.70 UC1 installed.

> Command:  g++ -o csql csql.C

> Thanks

> Jay Singh

 
 
 

Cannot Find Include File

Post by Jonathan Leffle » Thu, 15 Nov 2001 17:40:21



> Thanks, That helped a bit, but now I am running into more problems. I
> am getting the following error messages. I do not understand what is
> going on. [...]

> LORA:/home/informix/cpp/proj01 g++ -o csql -I$INFORMIXDIR/incl/c++
> -I$INFORMIXDI
> R/incl/dmi -I$INFORMIXDIR/incl/esql csql.C
> In file included from csql.C:3:
> /usr/opt/informix/incl/c++/it.h:85: parse error before `false'
> /usr/opt/informix/incl/c++/it.h:86: parse error before `true'
> LORA:/home/informix/cpp/proj01

Most likely your C++ compiler is vaguely aware of the ISO C++ standard (ISO/IEC 14882:1998) and therefore has
keywords true, false and bool.  Most likely, the C++ interface code you are trying to work with is not even
vaguely aware of the possibility that the C++ compiler might have keywords true, false and bool, so it is
setting up typedefs or #defines or enumerations or something to simulate this.  Most likely, then, the C++
compiler used to build the Informix C++ library is not the same as the C++ compiler you are actually using.
Most likely, then, you will run into problems because something will be different in the C++ memory layout
(and/or function name mangling) that is used by your compiler versus the original.  If all this turns out to
be faintly true -- it's a long chain of hypotheses -- then your code will probably not work correctly even if
you diddle the headers into not futzing with ISO C++ keywords.


> > I was trying to test out sample programs that come with the C++ object
> > interface. However I keep getting error messages "cannot fine the *.h
> > files".

> > I even hard coded the "include" path include
> > "/usr/opt/informix/incl/c++/it.h"

> > but then I started getting errors for other files that it.h refer to
> > but are not included in the same folder as the c++ includes.

> > In the documentation, I could only find references to LD_LIBRARY_PATH
> > env variable which I did set.

> > However I have a feeling that there is some other environment variable
> > that needs to be set so that the compiler can find the includes.

> > Linux Red Hat 6.2, with client sdk 2.70 UC1 installed.

> > Command:  g++ -o csql csql.C

And unless I'm grossly mistaken, this verion of GCC/G++ is at least somewhat aware of ISO C++.

--

Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>

 
 
 

Cannot Find Include File

Post by Sergey E. Volko » Thu, 15 Nov 2001 17:15:12


Try

g++ -o csql -I$INFORMIXDIR/incl/c++ -I$INFORMIXDIR/incl/dmi
-I$INFORMIXDIR/incl/esql -DIT_COMPILER_HAS_BOOL csql.C

----- Original Message -----


Sent: Tuesday, November 13, 2001 7:32 PM
Subject: Re: Cannot Find Include File

> Thanks, That helped a bit, but now I am running into more problems. I
> am getting the following error messages. I do not understand what is
> going on.

> Any help would be greatly appreciated.

> Thanks

> Jay Singh

> LORA:/home/informix/cpp/proj01 g++ -o csql -I$INFORMIXDIR/incl/c++
> -I$INFORMIXDI
> R/incl/dmi -I$INFORMIXDIR/incl/esql csql.C
> In file included from csql.C:3:
> /usr/opt/informix/incl/c++/it.h:85: parse error before `false'
> /usr/opt/informix/incl/c++/it.h:86: parse error before `true'
> LORA:/home/informix/cpp/proj01




- Show quoted text -

Quote:> > I was trying to test out sample programs that come with the C++ object
> > interface. However I keep getting error messages "cannot fine the *.h
> > files".

> > I even hard coded the "include" path include
> > "/usr/opt/informix/incl/c++/it.h"

> > but then I started getting errors for other files that it.h refer to
> > but are not included in the same folder as the c++ includes.

> > In the documentation, I could only find references to LD_LIBRARY_PATH
> > env variable which I did set.

> > However I have a feeling that there is some other environment variable
> > that needs to be set so that the compiler can find the includes.

> > Linux Red Hat 6.2, with client sdk 2.70 UC1 installed.

> > Command:  g++ -o csql csql.C

> > Thanks

> > Jay Singh

 
 
 

Cannot Find Include File

Post by Sergey E. Volko » Thu, 15 Nov 2001 20:07:35


Most likely Informix C++ library designed in the very inaccurate manner.
Most likely it has a very ugly design.

Well, it's very nice to build design based on the abstract base classes, but
why to mess it
with COM ( especially if COM support is not completed at all ) ?
Why to not  use a simple 'factory' pattern (without ugly references managing
ala COM ) ?
Why to not get rid of dependences of the mangled C++  symbols ( which is not
standards and is not portable ? )

Try to compile application which uses this library on the Solaris for
example using g++ or
on the Windoze using BCC or IBM V.Age !

I think it's a really * ( for Informix Support ) to support such product
!

----- Original Message -----


Sent: Wednesday, November 14, 2001 11:40 AM
Subject: Re: Cannot Find Include File


> > Thanks, That helped a bit, but now I am running into more problems. I
> > am getting the following error messages. I do not understand what is
> > going on. [...]

> > LORA:/home/informix/cpp/proj01 g++ -o csql -I$INFORMIXDIR/incl/c++
> > -I$INFORMIXDI
> > R/incl/dmi -I$INFORMIXDIR/incl/esql csql.C
> > In file included from csql.C:3:
> > /usr/opt/informix/incl/c++/it.h:85: parse error before `false'
> > /usr/opt/informix/incl/c++/it.h:86: parse error before `true'
> > LORA:/home/informix/cpp/proj01

> Most likely your C++ compiler is vaguely aware of the ISO C++ standard

(ISO/IEC 14882:1998) and therefore has
Quote:> keywords true, false and bool.  Most likely, the C++ interface code you

are trying to work with is not even
Quote:> vaguely aware of the possibility that the C++ compiler might have keywords

true, false and bool, so it is
Quote:> setting up typedefs or #defines or enumerations or something to simulate

this.  Most likely, then, the C++
Quote:> compiler used to build the Informix C++ library is not the same as the C++

compiler you are actually using.
Quote:> Most likely, then, you will run into problems because something will be

different in the C++ memory layout
Quote:> (and/or function name mangling) that is used by your compiler versus the

original.  If all this turns out to
Quote:> be faintly true -- it's a long chain of hypotheses -- then your code will

probably not work correctly even if
> you diddle the headers into not futzing with ISO C++ keywords.




- Show quoted text -

Quote:> > > I was trying to test out sample programs that come with the C++ object
> > > interface. However I keep getting error messages "cannot fine the *.h
> > > files".

> > > I even hard coded the "include" path include
> > > "/usr/opt/informix/incl/c++/it.h"

> > > but then I started getting errors for other files that it.h refer to
> > > but are not included in the same folder as the c++ includes.

> > > In the documentation, I could only find references to LD_LIBRARY_PATH
> > > env variable which I did set.

> > > However I have a feeling that there is some other environment variable
> > > that needs to be set so that the compiler can find the includes.

> > > Linux Red Hat 6.2, with client sdk 2.70 UC1 installed.

> > > Command:  g++ -o csql csql.C

> And unless I'm grossly mistaken, this verion of GCC/G++ is at least

somewhat aware of ISO C++.

- Show quoted text -

> --

> Guardian of DBD::Informix 1.00.PC1 -- see http://www.veryComputer.com/
> #include <disclaimer.h>