Menu

#8 Compilatoin Problem

open
nobody
5
2001-05-22
2001-05-22
Anonymous
No

While building the code i'm facing problem with file
named "Map.cpp". The following are the errors i'm
getting. These are mainly related with type-casting.
Hope you will provide me the solution.

==Errors===

make[2]: Entering directory
`/home/shiv/snmp-monitor-0.6/src'
c++ -DHAVE_CONFIG_H -I. -I. -I.. `gtk-config --cflags`
-I/usr/local/include -D_REENTRANT -O2 -c Map.cpp
Map.cpp: In function `void ns_map::pd_repoll_group
(GtkWidget *,
PopDown *)':
Map.cpp:38: cannot convert
`(+map->Map::getConsole())->Console::addText((&info),
Console::_information)' from type `void' to type `Map
*'
Map.cpp:43: cannot convert `void *(*) (Map *)' to
`void *(*) (void *)'
for argument `3' to `pthread_create (pthread_t *,
const pthread_attr_t
*, void *(*) (void *), void *)'
Map.cpp: In function `void ns_map::pd_repoll_object
(GtkWidget *,
PopDown *)':
Map.cpp:66: cannot convert `void *(*) (SNMPObject *)'
to `void *(*)
(void *)' for argument `3' to `pthread_create
(pthread_t *, const
pthread_attr_t *, void *(*) (void *), void *)'
Map.cpp: In function `void ns_map::menu_repoll_map
(GtkWidget *, Map
*)':
Map.cpp:92: cannot convert `void *(*) (Map *)' to
`void *(*) (void *)'
for argument `3' to `pthread_create (pthread_t *,
const pthread_attr_t
*, void *(*) (void *), void *)'
Map.cpp: In function `gint ns_map::start_repoll_thread
(Map *)':
Map.cpp:150: cannot convert `void *(*) (Map *)' to
`void *(*) (void *)'
for argument `3' to `pthread_create (pthread_t *,
const pthread_attr_t
*, void *(*) (void *), void *)'
Map.cpp: In method `void Map::initGraphics (GtkWidget
*)':
Map.cpp:415: cannot convert `gint (*) (Map *)' to
`gint (*) (void *)'
for argument `2' to `gtk_timeout_add (unsigned int,
gint (*) (void *),
void *)'
make[2]: *** [Map.o] Error 1
=====================================

My system configuration:
Linux Linux 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000
i686 unknown
gcc versions:
gcc-2.96-54
gcc-c++-2.96-54
gcc-objc-2.96-54
kgcc-1.1.2-40
gcc-g77-2.96-54
===
gtk versions:
gtk+-1.2.8-7
gtk+-devel-1.2.8-7
==

While i was runinng the configuration script, for some
of the checkings answer was NO.
These are the NO's i got..
====
checking whether the C compiler (gcc ) is a
cross-compiler... no
checking whether the C++ compiler (c++ ) is a
cross-compiler... no
checking for working const... (cached) no
checking for inline... (cached) no
=====

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.