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

net-snmp problem in Fedora Core 1

Hash: SHA1


When compiling wap11gui (http://wap11gui.sourceforge.net), I run into
the following error:

g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/lib/qt-3.1/include
- -DDATADIR=\"/usr/local/share/wap11gui\" -Wnon-virtual-dtor
- -Wno-long-long -Wbad-function-cast -Wundef -Wall -pedantic -W
- -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi
- -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2
- -fno-exceptions -fno-check-new -fexceptions -DNET_SNMP=1  -c -o
macauthimp.o `test -f macauthimp.cpp || echo './'`macauthimp.cpp
cc1plus: warning: "-Wbad-function-cast" is valid for C/ObjC but not for C++
In file included from /usr/include/net-snmp/utilities.h:26,
~                 from /usr/include/net-snmp/net-snmp-includes.h:64,
~                 from wap11config.h:24,
~                 from macauthimp.h:21,
~                 from macauthimp.cpp:22:
/usr/include/net-snmp/library/getopt.h:8: error: declaration of `int
~   getopt(int, char* const*, const char*)' throws different exceptions
/usr/include/getopt.h:154: error: than previous declaration `int getopt(int,
~   char* const*, const char*) throw ()'
make[1]: *** [macauthimp.o] Error 1
make[1]: Leaving directory `/home/ori/projects/wap11gui/wap11gui'
make: *** [all-recursive] Error 1

The problem is that /usr/include/net-snmp/utilities.h defines getopt()
as an extern, instead of including <getopt.h>, as it probably should.

The proper getopt.h is included by unistd.h, which, in a QT app, is
included somewhere insode the bowels of QT. This means that every QT app
that tries to use net-snmp under Fedora won't compile. I can't think of
any way an application could work around this.

This appears to be a new problem - RH 9 and 8.0 didn't have this, and I
haven't seen this problem on any other platform I tried compiling on
(Mandrake, SuSe, FreeBSD and Mac OS X).

- --
Ori Pessach
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


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