bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

demo directory did not build, general questions


From: Onno Kortmann
Subject: demo directory did not build, general questions
Date: Sun, 16 Mar 2003 05:04:52 +0100

Hi!
I'm new here.
I tried to build your demo directory of commoncpp2 and ran into two errors on 
my 
debian testing system with gcc 2.95.4. The compiler was not sure which "read" 
function to choose:

XXXXX
$ make -k
c++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include    -g -O2 -D_GNU_SOURCE 
 -
Wall -ansi -pedantic -c urlfetch.cpp
urlfetch.cpp: In function `int main(int, char **)':
urlfetch.cpp:83: request for member `read' is ambiguous
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:143: 
can
didates are: class istream & istream::read(void *, int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:141: 
can
didates are: class istream & istream::read(signed char *, int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:139: 
can
didates are: class istream & istream::read(unsigned char *, int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:137: 
can
didates are: class istream & istream::read(char *, int)
../include/cc++/socket.h:776:                 ssize_t ost::Socket::read(void 
*, 
unsigned int, char = 0, long unsigned int = 0)
make: *** [urlfetch.o] Fehler 1
c++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include    -g -O2 -D_GNU_SOURCE 
 -
Wall -ansi -pedantic -c xmlfetch.cpp
xmlfetch.cpp: In method `int myXMLParser::read(unsigned char *, int)':
xmlfetch.cpp:60: request for member `read' is ambiguous
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:143: 
can
didates are: class istream & istream::read(void *, int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:141: 
can
didates are: class istream & istream::read(signed char *, int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:139: 
can
didates are: class istream & istream::read(unsigned char *, int)
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/iostream.h:137: 
can
didates are: class istream & istream::read(char *, int)
../include/cc++/socket.h:776:                 ssize_t ost::Socket::read(void 
*, 
unsigned int, char = 0, long unsigned int = 0)
make: *** [xmlfetch.o] Fehler 1
make: Das Target »all« wurde wegen Fehlern nicht aktualisiert.
$   
XXXXX

A patch is appended.

And, after browsing your doxygen documentation, I have a rather simple 
question left:
Is there any function I can use to easily convert between string and int and 
float/double in common c++?
I'm not talking about things you may do with << operators.

People (Professionals!) I've talked to mostly prefer to use the C functions 
(atof etc.) a temporary strstream and hide this mechanism in their own little 
libraries, but this can't be the obvious solution?!
The current solution is also my "own little library", but I want to abolish 
it and use something like common c++ instead.

And another question: What's about the endianess of your persistency 
framework - is it supposed to reread object states only on the system which 
created them? Or should it work across different architectures?
At the moment, it seems that the endianess and the size of the written data 
(e.g. int=32 bit on i386) is fixed to the values the current system supports.

Regards,

Onno

Attachment: demo-build.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]