logo       

Re: Problem with sigc++: msg#00013

sysutils.cfg.devel

Subject: Re: Problem with sigc++

Hi Jason,

Jason Long wrote:
Unfortunately, I don't recall seeing the compiler errors you're having. My
first thought is that it is incompatible with version 3.3 of gcc, but that
seems unlikely.
Yes.


I guess my suggestion would be to create a cpp file that only includes
sigc++.h and see if the compiler errors go away...
e.g.
test.cpp:
=============
#include <sigc++.h>
=============
OK, it works...

What does not work is the following:

$ cat test.cpp
#include <qobject.h>
#include <FrontendHelper.h>


int main(int argc, char **argv){
return 0;
}
$ gcc-3.3 -DHAVE_CONFIG_H -I. -I/usr/share/qt3/include -I. -I.. -I/opt/include -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/home/pierre/apps/config4gnu-0.1.8/src/libconfig4gnu test.cpp -o /dev/null
In file included from /usr/include/sigc++-1.2/sigc++/sigc++.h:27,
from /home/pierre/apps/config4gnu-0.1.8/src/libconfig4gnu/CfgObject.h:9,
from /home/pierre/apps/config4gnu-0.1.8/src/libconfig4gnu/FrontendHelper.h:4,
from test.cpp:2:
/usr/include/sigc++-1.2/sigc++/signal.h:167: error: declaration does not
declare anything
/usr/include/sigc++-1.2/sigc++/signal.h:167: error: parse error before `)'
token
/usr/include/sigc++-1.2/sigc++/signal.h:171: error: ISO C++ forbids defining
types within return type
/usr/include/sigc++-1.2/sigc++/signal.h:171: error: syntax error before `
operator'
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: ISO C++ forbids declaration
of `operator()' with no type
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: `int SigC::operator()()'
must be a nonstatic member function
/usr/include/sigc++-1.2/sigc++/signal.h: In function `int SigC::operator()()':
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: `impl_' undeclared (first
use this function)
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: (Each undeclared identifier
is reported only once for each function it appears in.)
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: `emit_' undeclared (first
use this function)
/usr/include/sigc++-1.2/sigc++/signal.h: At global scope:
/usr/include/sigc++-1.2/sigc++/signal.h:175: error: ISO C++ forbids declaration
of `Signal0' with no type
/usr/include/sigc++-1.2/sigc++/signal.h: In function `int SigC::Signal0()':
/usr/include/sigc++-1.2/sigc++/signal.h:175: error: `int SigC::Signal0()'
redeclared as different kind of symbol
/usr/include/sigc++-1.2/sigc++/signal.h:144: error: previous declaration of `
template<class R, class Marsh> class SigC::Signal0'
/usr/include/sigc++-1.2/sigc++/signal.h:144: error: previous non-function
declaration `template<class R, class Marsh> class SigC::Signal0'
/usr/include/sigc++-1.2/sigc++/signal.h:175: error: conflicts with function
declaration `int SigC::Signal0()'
/usr/include/sigc++-1.2/sigc++/signal.h:175: error: only constructors take base
initializers
/usr/include/sigc++-1.2/sigc++/signal.h:176: confused by earlier errors, bailing out

----------


In fact, the compiler is confused when I try to include qt and sigc++ !!

Need more investigations... if I remove the line:
#include <qobject.h>

It works... funny. I think it is related to the method emit, but the compiler is confused.

emit exist in QT and sigc++ it seems...

Have any idea ?

Thanks for your feedback.

Best Regards.

Pierre Souchay


Furthermore, you could try including the sigc++.h header before you include
Config4GNU headers and see if that changes the errors you're getting.

Now, about your problem with the gtkmm client. Are you getting the same
errors with that as well?

No other kinds of errors related to gtkmm... but I think I just don't have all the needed libraries.

Jason



pierre-AGo4eGgojJnR7s880joybQ@xxxxxxxxxxxxxxxx 1/27/04 8:25:02 AM >>>

Hi,

I have compiled config4gnu on my debian testing with gcc3.3 and it works. I use sigc++-1.2 (debian package) and would like to create a client for KDE.

I know sigc++ is not your library, but maybe you already had similar issues (see at the bottom).

I cannot compile your gtkmm client neither.

Best Regards.

Thanks.

Pierre Souchay


In file included from /usr/include/sigc++-1.2/sigc++/sigc++.h:27,
from /home/pierre/apps/config4gnu-0.1.8/src/libconfig4gnu/CfgObject.h:9,
from /home/pierre/apps/config4gnu-0.1.8/src/libconfig4gnu/FrontendHelper.h:4,
from konfig4gnu_part.cpp:15:
/usr/include/sigc++-1.2/sigc++/signal.h:167: error: declaration does not
declare anything
/usr/include/sigc++-1.2/sigc++/signal.h:167: error: parse error before `)'
token
/usr/include/sigc++-1.2/sigc++/signal.h:171: error: ISO C++ forbids
defining
types within return type
/usr/include/sigc++-1.2/sigc++/signal.h:171: error: syntax error before `
operator'
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: ISO C++ forbids declaration
of `operator()' with no type
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: `int
SigC::operator()()'
must be a nonstatic member function
/usr/include/sigc++-1.2/sigc++/signal.h: In function `int SigC::operator()()':
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: `impl_' undeclared (first
use this function)
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: (Each undeclared identifier
is reported only once for each function it appears in.)
/usr/include/sigc++-1.2/sigc++/signal.h:172: error: `emit_' undeclared (first
use this function)
/usr/include/sigc++-1.2/sigc++/signal.h: At global scope:
/usr/include/sigc++-1.2/sigc++/signal.h:175: error: ISO C++ forbids declaration
of `Signal0' with no type
/usr/include/sigc++-1.2/sigc++/signal.h: In function `int
SigC::Signal0()':
/usr/include/sigc++-1.2/sigc++/signal.h:175: error: `int SigC::Signal0()'
redeclared as different kind of symbol
/usr/include/sigc++-1.2/sigc++/signal.h:144: error: previous declaration of `
template<class R, class Marsh> class SigC::Signal0'
/usr/include/sigc++-1.2/sigc++/signal.h:144: error: previous non-function
declaration `template<class R, class Marsh> class SigC::Signal0'
/usr/include/sigc++-1.2/sigc++/signal.h:175: error: conflicts with
function
declaration `int SigC::Signal0()'
/usr/include/sigc++-1.2/sigc++/signal.h:175: error: only constructors take base
initializers
/usr/include/sigc++-1.2/sigc++/signal.h:176: confused by earlier errors, bailing out



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn _______________________________________________
Config4gnu-developer mailing list
Config4gnu-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/config4gnu-developer





-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise