Skip to main content
GameDev.net gamedev.net
🔒 Locked

Internal compiler error using boost::signals

Started by MDI Jan 27, 2004 at 8:38 AM 6 replies 1.1k views
Original Post
MDI
MDI
I''m using MSVC 6.0 SP 5 and receive an internal compiler error while trying to compile the example code given in the boost docs. A quick search of Google didn''t bring anything obvious up. I''m using the compatibility version of the signals library syntax, and this is the code that fails to compile:
#include <boost/signal.hpp>
#include <iostream>

struct HelloWorld {
	void operator () () const {
		std :: cout << "Hello World!" << std :: endl;
	}
};

int main (int argc, char **argv) {
	boost :: signal0 <void> sig;
	HelloWorld hello;
	sig.connect (hello);
	sig ();
	return 0;
}
With the following error:
--------------------Configuration: BoostTest - Win32 Debug--------------------
Compiling...
main.cpp
c:\boost\boost-1.30.2\boost\iterator_adaptors.hpp(872) : fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file ''msc1.cpp'', line 1794) 
         Please choose the Technical Support command on the Visual C++ 
         Help menu, or open the Technical Support help file for more information
        c:\boost\boost-1.30.2\boost\signals\signal_template.hpp(303) : see reference to class template instantiation ''boost::iterator_adaptor<class std::_Tree<class boost::any,struct std::pair<class boost::any const ,struct boost::signals::detail::c
onnection_slot_pair>,struct std::multimap<class boost::any,struct boost::signals::detail::connection_slot_pair,class boost::function2<bool,class boost::any,class boost::any,int>,class std::allocator<struct boost::signals::detail::connection_slot_pai
r> >::_Kfn,class boost::function2<bool,class boost::any,class boost::any,int>,class std::allocator<struct boost::signals::detail::connection_slot_pair> >::iterator,class boost::signals::detail::slot_call_policies<struct boost::signals::detail::call_
bound0<void>::caller<class boost::function0<void,int> >,class std::_Tree<class boost::any,struct std::pair<class boost::any const ,struct boost::signals::detail::connection_slot_pair>,struct std::multimap<class boost::any,struct boost::signals::deta
il::connection_slot_pair,class boost::function2<bool,class boost::any,class boost::any,int>,class std::allocator<struct boost::signals::detail::connection_slot_pair> >::_Kfn,class boost::function2<bool,class boost::any,class boost::any,int>,class st
d::allocator<struct boost::signals::detail::connection_slot_pair> >::iterator>,struct boost::signals::detail::unusable,struct boost::signals::detail::unusable &,struct boost::signals::detail::unusable *,struct std::input_iterator_tag,struct boost::d
etail::default_argument>'' being compiled
Command line warning D4028 : minimal rebuild failure, reverting to normal build
Error executing cl.exe.

BoostTest.exe - 1 error(s), 1 warning(s)
Can anyone help me? TIA.
Shannon Barber
Shannon Barber
Upgrade to MSVC7.1
MSVC6 does not handle many things and it causes trouble for a large number libraries, including several of the ones in boost.

...
I think it''s the void in the singal0 template.
Have it return a value and it might work (MSVC6 problem).
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
MDI
MDI
quote:

There is an excellent support newsgroup at boost. Have you tried there?



Unfortunately I''m on a university LAN which does not permit access to newsgroups, apart from the university''s own.

quote:

Upgrade to MSVC7.1
MSVC6 does not handle many things and it causes trouble for a large number libraries, including several of the ones in boost.



I thought that would be a probable answer. I have no money to upgrade, and the boost signals docs specifically mention MSVC 6.0 in their compatibility information blurb.

quote:

...
I think it''s the void in the singal0 template.
Have it return a value and it might work (MSVC6 problem).



Tried it, same error, with void replaced with int :-(

What about the latest versions of Mingw32 / gc++? Would they compile it, or have they got the same template problems as MSVC 6.0?
SiCrane
SiCrane
Service pack 6 was recently released for MSVC 6. I doubt that will help in your particular instance, but its there. Are you sure you're using the latest version of boost? Compatability fixes get added all the time.

edit: darn it! I hate it when I'm taken in by a necro.

[edited by - SiCrane on April 1, 2004 12:56:37 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.