Standard library confusion
From: Walkaway Renouf (walkaway_at_anon.com)
Date: 02/29/04
- Next message: Chris \( Val \): "Re: When to introduce exception safety"
- Previous message: Francis Glassborow: "Re: When to introduce exception safety"
- Next in thread: Jeff Schwab: "Re: Standard library confusion"
- Reply: Jeff Schwab: "Re: Standard library confusion"
- Reply: Francis Glassborow: "Re: Standard library confusion"
- Reply: Greg Comeau: "Re: Standard library confusion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 29 Feb 2004 12:07:25 +0100
I'm about to try to teach myself C++ and have a couple of books on order
from Amazon. But I'm the impatient type, and while I'm waiting for them
to arrive, I figured I'd find what I can on the web. The problem is,
this has led to a little confusion (not surprising really).
I'm using SuSE 8.2. I have a couple of compilers at my command - g++ and
gcc.
It would seem that g++ uses library files such as <iostream> which, if I
understand correctly, is the older style of doing things. When using
gcc, I use something like <stdio.h>, which is part of the current
standard library - is that right?
Now, gcc looks for its standard library files in /usr/include/ and g++
looks in /usr/include/g++/ - which is all very well, but is it possible
to mix the two? The reason I ask is that the programs I want to write
will probably involve MySQL databases, so I want to use the MySQL++ API.
This, although it claims to be compiled for the gcc compiler, seems to
use things like <iostream>. To confuse things further, it wants MySQL
header files which are in /usr/include/mysql/. The compilers don't
appear to look in there when they encounter:
#include <mysql.h>
So here are some specific questions (I have googled on these to some
extent, but have had trouble getting straight answers):
* If, say, gcc is configured to look in /usr/include/ for header files,
will it automatically look in sub-directories too?
* If not (as I suspect), should I change gcc's configuration to include
any sub-dirs I want to use - such as /usr/include/mysql/?
* Would it be sensible to also change gcc's config to look in
/usr/include/g++/ in case it encounters older-style headers in API or
other header files? Or might this lead to other problems?
Any help would be appreciated.
- Next message: Chris \( Val \): "Re: When to introduce exception safety"
- Previous message: Francis Glassborow: "Re: When to introduce exception safety"
- Next in thread: Jeff Schwab: "Re: Standard library confusion"
- Reply: Jeff Schwab: "Re: Standard library confusion"
- Reply: Francis Glassborow: "Re: Standard library confusion"
- Reply: Greg Comeau: "Re: Standard library confusion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|