This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Compile problems with g++-3.0


Hello,

I mailed this to the bug tracking system of the kde project,
but they said that this could be a gcc specific problem.
This could be possible, since similar errors occured while
compiling qt-2.3.1.
It is also possible that my compiler is misconfigured or
that qt, kde or solaris are not gcc3-ready.

Note, that everything works as expected if sys/socket.h
is not included.

It seems that the #defines in /usr/include/sys/socket.h
overrule every method or function with the same name:
#define bind    __xnet_bind
#define connect __xnet_connect
and so on

A crude solution is to place
#defines around every failing line like this:
#define connect connect
  connect(...);
#define connect __xnet_connect

but this can't be the way...

(NB: gcc-2.95.3 works fine)

These are the error messages I get:

kapp.cpp: In member function void KCheckAccelerators::checkAccelerators()':
kapp.cpp:391: cannot convert QPushButton*' to int' for argument 1' to int
__xnet_connect(int, const sockaddr*, unsigned int)'


Line 391: this is a call to the connect method of the qt library 
connect( btnClose, SIGNAL( clicked() ), dlg, SLOT( close() ) );

My gcc configuration:
Reading specs from
/opt/local/bin/../lib/gcc-lib/sparcv9-sun-solaris2.8/3.0/specs
Configured with: ../gcc-3.0/configure --prefix=/opt/local/stow/gcc-3.0/gcc64
--with-local-prefix=/opt/local --enable-shared --enable-threads --enable-nls
--with-included-gettext --enable-languages=c++,f77
--target=sparcv9-sun-solaris2.8 --host=sparcv9-sun-solaris2.8
--with-cpu=supersparc
Thread model: posix
gcc version 3.0

I am not the only one who run into this problem. Look at
http://groups.google.com/groups?q=__xnet_connect&hl=en&safe=off&rnum=1&ic=1&selm=9gvot5%2421u1%241%40FreeBSD.csie.NCTU.edu.tw



Sincerely,
   Gerhard


-- 
Internet ist das Ding mit den Kabeln -
Usenet ist das Ding mit den Menschen
                        (Hubert Partl)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]