[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
snprintf and g++
From: |
Gervase Lam |
Subject: |
snprintf and g++ |
Date: |
Fri, 20 Sep 2002 00:02:06 +0100 |
I've found out why I needed to keep on putting #include<stdio.h> into
files with snprintf() in them. I had compiled Pingus (and therefore
Clanlib/Hermes) with g++ v2.96 and not g++ v3.0.4.
Initially, g++ could not find the prototypes for snprintf, which I
corrected. Then it couldn't find the ostream include file. After
finding out that 2.96 was being used, I decided to change the links for
g++ to refer to g++ 3.0.4, which had ostream in a better place. After
changing the links, I was able to compile the files that used ostream.
However, the link changes also resulted in no errors in the files that had
snprintf, even though the files did not have #include<stdio.h>. Strictly
speaking, there should be a #include<stdio.h> in a file where snprintf is
as it could be that the other include files might not have
#include<stdio.h> in any of them.
Even though I have no compilation errors now, I am still going to attach
the patched snprintf files to this e-mail.
Thanks,
Gervase.
pingus.20020920.cvs.diff
Description: Text Data
- snprintf and g++,
Gervase Lam <=