
----- Original Message ---- From: Arkadiy Vertleyb <vertleyb@hotmail.com> To: boost-users@lists.boost.org Sent: Thursday, May 17, 2007 7:31:04 PM Subject: Re: [Boost-users] fatal error C1001 with visual studio 8, boost 1.34, BOOST_AUTO() macro
"Trigve Siver" <trigves@yahoo.com> wrote
Strange...
Can you post the entire file where you use BOOST_AUTO (and also the file(s) where you register your types)?
Hi, of course...
Well, I don't have PostgreSQL, and can't reproduce the situation without it :(
So I am going to ask you to try a couple more things. Can you try all of these:
Hi, there it is:
1) typedef BOOST_TYPEOF(T.exec("SELECT 1")) type;
typedef BOOST_TYPEOF(T.exec("SELECT 1")) type; // OK
2) boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1"));
boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1")); // Linker error --- ------ Build started: Project: test_boost_auto, Configuration: Debug Win32 ------ Compiling... stdafx.cpp using typeof emulation Compiling... test_boost_auto.cpp Compiling manifest to resources... Linking... test_boost_auto.obj : error LNK2019: unresolved external symbol "struct boost::type_of::sizer<struct boost::type_of::vector1<struct boost::mpl::size_t<327697> > > __cdecl boost::type_of::encode<struct boost::type_of::vector0<void>,class pqxx::result>(class pqxx::result const &)" (??$encode@U?$vector0@X@type_of@boost@@Vresult@pqxx@@@type_of@boost@@YA?AU?$sizer@U?$vector1@U?$size_t@$0FAABB@@mpl@boost@@@type_of@boost@@@01@ABVresult@pqxx@@@Z) referenced in function _main D:\Temp\DELETE\test_boost_auto\Debug\test_boost_auto.exe : fatal error LNK1120: 1 unresolved externals Build log was saved at "file://d:\Temp\DELETE\test_boost_auto\Debug\BuildLog.htm" test_boost_auto - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ---
3) boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1")).item0;
boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1")).item0; // Linke error(only once)/Fatal error? Sometimes it throw out fatal error and sometimes linker error (only once so far) --- ---
4) sizeof(boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1")).item0);
sizeof(boost::type_of::encode<boost::type_of::vector0<> >(T.exec("SELECT 1")).item0); // fatal error
5) typedef boost::mpl::size_t<sizeof(boost::type_of::encode<boost::type_of::vector0<>
(T.exec("SELECT 1")).item0)> type;
typedef boost::mpl::size_t<sizeof(boost::type_of::encode<boost::type_of::vector0<>>(T.exec("SELECT 1")).item0)> type; // OK
Which one compiles and which doesn't?
So 1, 5 -OK 2, 3 - Linker error 3, 4 - Fatal error
Regards, Arkadiy
Thanks Trigve ____________________________________________________________________________________Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. http://new.toolbar.yahoo.com/toolbar/features/mail/index.php