Boost logo

Boost Users :

From: Trigve Siver (trigves_at_[hidden])
Date: 2007-05-17 14:03:06


>----- Original Message ----
>From: Arkadiy Vertleyb <vertleyb_at_[hidden]>
>To: boost-users_at_[hidden]
>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_at_[hidden]> 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_at_U?$vector0_at_X@type_of_at_boost@@Vresult_at_pqxx@@@type_of_at_boost@@YA?AU?$sizer_at_U?$vector1_at_U?$size_t@$0FAABB@@mpl_at_boost@@@type_of_at_boost@@@01_at_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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net